From 8e6b764fb5eadf300ab3844b4b3b8cf5ad5c9fe7 Mon Sep 17 00:00:00 2001 From: amibranch <147333645+amibranch@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:59:42 +0100 Subject: [PATCH] build: Improved meson-build to use rizin as subproject (#4684) * Setting GNU99/C99 standard for subprojects * Remove use of `add_global_arguments` * Added extern "C" linkage specification to some public headers of rizin * Changed the meson_git_wrapper.py-script to explicitly specify the output-path * Made the RIZIN_BUILD_PATH conditional in the integration-test meson-build Co-authored-by: amibranch --- librz/include/rz_types.h | 8 +++++++ librz/include/rz_util/rz_intervaltree.h | 8 +++++++ meson.build | 22 +++++++++---------- subprojects/nettle/meson.build | 2 +- subprojects/packagefiles/blake3/meson.build | 9 +++++++- .../packagefiles/capstone-4.0.2/meson.build | 13 ++++++++++- .../packagefiles/capstone-5.0.1/meson.build | 13 ++++++++++- .../capstone-6.0.0-alpha1/meson.build | 13 ++++++++++- .../packagefiles/capstone-next/meson.build | 13 ++++++++++- .../packagefiles/libmspack/meson.build | 10 ++++++++- .../packagefiles/libzip-1.9.2/meson.build | 11 +++++++++- .../packagefiles/lz4-1.9.4/meson.build | 11 ++++++++-- subprojects/packagefiles/pcre2/meson.build | 4 ++++ .../packagefiles/rizin-grammar-c/meson.build | 14 +++++++++++- .../tree-sitter-0.21.0/meson.build | 11 +++++++++- subprojects/packagefiles/xz-5.2.9/meson.build | 12 ++++++++-- .../packagefiles/zlib-1.3.1/meson.build | 10 ++++++++- subprojects/rizin-shell-parser/meson.build | 9 +++++++- subprojects/rzar/meson.build | 11 +++++++++- subprojects/rzgdb/meson.build | 7 ++++++ subprojects/rzqnx/meson.build | 11 +++++++++- subprojects/rzwinkd/meson.build | 9 +++++++- subprojects/xxhash/meson.build | 16 ++++++++++---- sys/meson_git_wrapper.py | 21 +++++++++--------- test/integration/meson.build | 6 ++++- 25 files changed, 228 insertions(+), 46 deletions(-) diff --git a/librz/include/rz_types.h b/librz/include/rz_types.h index 5f194ba7d72..c85ab0a089e 100644 --- a/librz/include/rz_types.h +++ b/librz/include/rz_types.h @@ -14,6 +14,10 @@ #include #endif +#ifdef __cplusplus +extern "C" { +#endif + // TODO: fix this to make it crosscompile-friendly: RZ_SYS_OSTYPE ? /* operating system */ #undef __BSD__ @@ -729,4 +733,8 @@ static inline void *rz_asm_plugin_data_from_rz_analysis(RZ_NONNULL void /*plugin_data; } +#ifdef __cplusplus +} +#endif + #endif // RZ_TYPES_H diff --git a/librz/include/rz_util/rz_intervaltree.h b/librz/include/rz_util/rz_intervaltree.h index 5fd6c8dcef9..72ab5cf5ea7 100644 --- a/librz/include/rz_util/rz_intervaltree.h +++ b/librz/include/rz_util/rz_intervaltree.h @@ -7,6 +7,10 @@ #include "rz_rbtree.h" #include "../rz_types.h" +#ifdef __cplusplus +extern "C" { +#endif + /* * RzIntervalTree is a special RBTree (augmented red-black tree) * that holds its entries, each associated with a interval, @@ -100,4 +104,8 @@ static inline bool rz_interval_tree_empty(RzIntervalTree *tree) { if ((tree)->root) \ for ((it) = rz_rbtree_last(&(tree)->root->node); rz_rbtree_iter_has(&it) && (dat = rz_rbtree_iter_get(&it, RzIntervalNode, node)->data); rz_rbtree_iter_prev(&(it))) +#ifdef __cplusplus +} +#endif + #endif // RZ_INTERVALTREE_H diff --git a/meson.build b/meson.build index 9f8395d3698..19c5760123b 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('rizin', 'c', version: 'v0.8.0', - license: 'LGPL3', + license: 'LGPL-3.0-only', meson_version: '>=0.57.0', default_options: [ 'buildtype=debugoptimized', @@ -91,14 +91,14 @@ if cc.has_argument('-Wenum-compare') endif if cc.has_argument('--std=gnu99') - add_global_arguments('--std=gnu99', language: ['c', 'cpp']) + add_project_arguments('--std=gnu99', language: ['c', 'cpp']) elif cc.has_argument('--std=c99') - add_global_arguments('--std=c99', language: ['c', 'cpp']) + add_project_arguments('--std=c99', language: ['c', 'cpp']) endif # Sanitize correct usage of rz_strf() if cc.has_argument('-Werror=sizeof-pointer-memaccess') - add_global_arguments('-Werror=sizeof-pointer-memaccess', language: ['c', 'cpp']) + add_project_arguments('-Werror=sizeof-pointer-memaccess', language: ['c', 'cpp']) endif if cc.has_argument('-Wimplicit-fallthrough=3') @@ -117,17 +117,17 @@ endif if get_option('default_library') == 'shared' if cc.has_argument('-fvisibility=hidden') - add_global_arguments('-fvisibility=hidden', language: 'c') + add_project_arguments('-fvisibility=hidden', language: 'c') endif endif add_project_arguments(['-DRZ_PLUGIN_INCORE=1'], language: 'c') b_sanitize_opt = get_option('b_sanitize') if (b_sanitize_opt.contains('address') or b_sanitize_opt.contains('undefined')) and cc.get_id() == 'clang' - add_global_arguments('-shared-libasan', language: 'c') - add_global_link_arguments('-shared-libasan', language: 'c') - add_global_arguments('-shared-libasan', language: 'c', native: true) - add_global_link_arguments('-shared-libasan', language: 'c', native: true) + add_project_arguments('-shared-libasan', language: 'c') + add_project_link_arguments('-shared-libasan', language: 'c') + add_project_arguments('-shared-libasan', language: 'c', native: true) + add_project_link_arguments('-shared-libasan', language: 'c', native: true) endif fs = import('fs') @@ -366,7 +366,7 @@ foreach it : ccs have_pthread = it_th.found() and it_machine.system() != 'windows' if it_machine.system() == 'sunos' # workaround for Solaris until https://github.com/mesonbuild/meson/issues/4328 is fixed - it_mth = declare_dependency(link_args: '-lm', native: it_native) + it_mth = declare_dependency(link_args: '-lm') else it_mth = it_cc.find_library('m', required: false, static: is_static_build) endif @@ -569,7 +569,7 @@ if git_exe.found() and fs.exists('.git') build_always_stale: true, build_by_default: true, output: 'gittip', - command: [py3_exe, git_exe_repo_py, git_exe, repo, 'rev-parse', 'HEAD'], + command: [py3_exe, git_exe_repo_py, git_exe, repo, '@OUTPUT@', 'rev-parse', 'HEAD'], install: true, install_dir: rizin_datdir_rz ) diff --git a/subprojects/nettle/meson.build b/subprojects/nettle/meson.build index ff102850a96..52dcc11ca04 100644 --- a/subprojects/nettle/meson.build +++ b/subprojects/nettle/meson.build @@ -1,5 +1,5 @@ project('nettle', 'c', - license: [ 'LGPL'], + license: 'LGPL', version: '3.7.3' ) # https://git.lysator.liu.se/nettle/nettle diff --git a/subprojects/packagefiles/blake3/meson.build b/subprojects/packagefiles/blake3/meson.build index c1c83905f2b..0e9c4c69c3b 100644 --- a/subprojects/packagefiles/blake3/meson.build +++ b/subprojects/packagefiles/blake3/meson.build @@ -1,4 +1,11 @@ -project('blake3', 'c', version: '1.3.1', license : ['CC0-1.0'], meson_version: '>=0.55.0') +project('blake3', 'c', + version: '1.3.1', + license: 'CC0-1.0', + meson_version: '>=0.55.0', + default_options: [ + 'c_std=c99', + ] +) cc = meson.get_compiler('c') diff --git a/subprojects/packagefiles/capstone-4.0.2/meson.build b/subprojects/packagefiles/capstone-4.0.2/meson.build index 1d3d10516bd..3d0d28c7cce 100644 --- a/subprojects/packagefiles/capstone-4.0.2/meson.build +++ b/subprojects/packagefiles/capstone-4.0.2/meson.build @@ -1,4 +1,15 @@ -project('capstone', 'c', version: '4.0.2', meson_version: '>=0.55.0') +project('capstone', 'c', + version: '4.0.2', + meson_version: '>=0.55.0', +) + +cc = meson.get_compiler('c') + +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif cs_files = [ 'arch/AArch64/AArch64BaseInfo.c', diff --git a/subprojects/packagefiles/capstone-5.0.1/meson.build b/subprojects/packagefiles/capstone-5.0.1/meson.build index 8baa78fa562..b6ac8cf6b60 100644 --- a/subprojects/packagefiles/capstone-5.0.1/meson.build +++ b/subprojects/packagefiles/capstone-5.0.1/meson.build @@ -1,4 +1,15 @@ -project('capstone', 'c', version: '5.0.1', meson_version: '>=0.55.0') +project('capstone', 'c', + version: '5.0.1', + meson_version: '>=0.55.0', +) + +cc = meson.get_compiler('c') + +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif cs_files = [ 'arch/AArch64/AArch64BaseInfo.c', diff --git a/subprojects/packagefiles/capstone-6.0.0-alpha1/meson.build b/subprojects/packagefiles/capstone-6.0.0-alpha1/meson.build index d92f1ab6f3a..dbb8e2528ce 100644 --- a/subprojects/packagefiles/capstone-6.0.0-alpha1/meson.build +++ b/subprojects/packagefiles/capstone-6.0.0-alpha1/meson.build @@ -1,4 +1,15 @@ -project('capstone', 'c', version: 'next', meson_version: '>=0.55.0') +project('capstone', 'c', + version: 'next', + meson_version: '>=0.55.0', +) + +cc = meson.get_compiler('c') + +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif cs_files = [ 'arch/Alpha/AlphaDisassembler.c', diff --git a/subprojects/packagefiles/capstone-next/meson.build b/subprojects/packagefiles/capstone-next/meson.build index f22e3606a7b..7750c39b12d 100644 --- a/subprojects/packagefiles/capstone-next/meson.build +++ b/subprojects/packagefiles/capstone-next/meson.build @@ -1,4 +1,15 @@ -project('capstone', 'c', version: 'next', meson_version: '>=0.55.0') +project('capstone', 'c', + version: 'next', + meson_version: '>=0.55.0', +) + +cc = meson.get_compiler('c') + +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif cs_files = [ 'arch/Alpha/AlphaDisassembler.c', diff --git a/subprojects/packagefiles/libmspack/meson.build b/subprojects/packagefiles/libmspack/meson.build index 8cc94d7f8ab..fe8e768b4be 100644 --- a/subprojects/packagefiles/libmspack/meson.build +++ b/subprojects/packagefiles/libmspack/meson.build @@ -1,7 +1,15 @@ -project('libmspack', 'c', version: '0.10.1alpha', license : ['LGPL2'], meson_version: '>=0.55.0') +project('libmspack', 'c', + version: '0.10.1alpha', + license : 'LGPL2', + meson_version: '>=0.55.0', +) cc = meson.get_compiler('c') +if cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif + # handle libmspack dependency libmspack_files = [ 'libmspack' / 'mspack' / 'cabc.c', diff --git a/subprojects/packagefiles/libzip-1.9.2/meson.build b/subprojects/packagefiles/libzip-1.9.2/meson.build index 911bb9d6976..f21737f060d 100644 --- a/subprojects/packagefiles/libzip-1.9.2/meson.build +++ b/subprojects/packagefiles/libzip-1.9.2/meson.build @@ -1,10 +1,19 @@ project('libzip', 'c', - version: '1.9.2') + version: '1.9.2', + license: 'BSD-3-clause', + meson_version: '>=0.55.0', +) py3_exe = import('python').find_installation() cc = meson.get_compiler('c') is_static_build = get_option('static_runtime') +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif + # Create config.h file conf_data = configuration_data() zlib_dep = dependency('zlib', required: get_option('use_sys_zlib'), static: is_static_build) diff --git a/subprojects/packagefiles/lz4-1.9.4/meson.build b/subprojects/packagefiles/lz4-1.9.4/meson.build index d7c94b657ac..0668f35c262 100644 --- a/subprojects/packagefiles/lz4-1.9.4/meson.build +++ b/subprojects/packagefiles/lz4-1.9.4/meson.build @@ -1,7 +1,14 @@ project('lz4', ['c'], - license: ['BSD', 'GPLv2'], + license: 'BSD-2-Clause-Patent AND GPL-2.0-or-later', version: '1.9.4', - meson_version: '>=0.47.0') + meson_version: '>=0.55.0', +) + +cc = meson.get_compiler('c') + +if cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif lz4_files = [ 'lib/lz4.c', diff --git a/subprojects/packagefiles/pcre2/meson.build b/subprojects/packagefiles/pcre2/meson.build index 4b2db66a442..aa3cdf6ce38 100644 --- a/subprojects/packagefiles/pcre2/meson.build +++ b/subprojects/packagefiles/pcre2/meson.build @@ -2,6 +2,10 @@ project('pcre2', 'c', version: '10.44') cc = meson.get_compiler('c') +if cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif + conf_data = configuration_data() pcre2_chartables = configure_file(input : 'src/pcre2_chartables.c.dist', diff --git a/subprojects/packagefiles/rizin-grammar-c/meson.build b/subprojects/packagefiles/rizin-grammar-c/meson.build index 859131d859b..7fda14cca0b 100644 --- a/subprojects/packagefiles/rizin-grammar-c/meson.build +++ b/subprojects/packagefiles/rizin-grammar-c/meson.build @@ -1,4 +1,16 @@ -project('rizin-grammar-c', 'c', default_options: ['werror=false']) +project('rizin-grammar-c', 'c', + license: 'MIT', + meson_version: '>=0.55.0', + default_options: [ + 'werror=false' + ] +) + +cc = meson.get_compiler('c') + +if cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif ts_c_files = [ 'src/parser.c' diff --git a/subprojects/packagefiles/tree-sitter-0.21.0/meson.build b/subprojects/packagefiles/tree-sitter-0.21.0/meson.build index 8b4af7e5d26..89282664392 100644 --- a/subprojects/packagefiles/tree-sitter-0.21.0/meson.build +++ b/subprojects/packagefiles/tree-sitter-0.21.0/meson.build @@ -1,7 +1,16 @@ -project('tree-sitter', 'c') +project('tree-sitter', 'c', + license: 'MIT', + meson_version: '>=0.55.0', +) cc = meson.get_compiler('c') +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif + tree_sitter_path = 'tree-sitter' tree_sitter_files = ['lib/src/lib.c'] diff --git a/subprojects/packagefiles/xz-5.2.9/meson.build b/subprojects/packagefiles/xz-5.2.9/meson.build index bc0d7b5cde1..896bccb4824 100644 --- a/subprojects/packagefiles/xz-5.2.9/meson.build +++ b/subprojects/packagefiles/xz-5.2.9/meson.build @@ -1,10 +1,18 @@ # liblzma is what upstream uses for their pkg-config name project('liblzma', 'c', - version : '5.2.9', - license : 'pd/lgpl2/gpl2/gpl3',) + version : '5.4.3', + license : ['PD', 'LGPL2', 'GPL2', 'GPL3'], + meson_version: '>=0.55.0', +) cc = meson.get_compiler('c') +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif + lzma_cflags = ['-DHAVE_CONFIG_H', '-DTUKLIB_SYMBOL_PREFIX=lzma_', '-DLZMA_API_STATIC'] cdata = configuration_data() diff --git a/subprojects/packagefiles/zlib-1.3.1/meson.build b/subprojects/packagefiles/zlib-1.3.1/meson.build index 528f73a41b8..d38f116b6d9 100644 --- a/subprojects/packagefiles/zlib-1.3.1/meson.build +++ b/subprojects/packagefiles/zlib-1.3.1/meson.build @@ -1,7 +1,15 @@ -project('zlib', 'c', version : '1.3.1', license : 'zlib') +project('zlib', 'c', + version : '1.3.1', + license : 'zlib', + meson_version: '>=0.55.0', +) cc = meson.get_compiler('c') +if cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif + link_args = [] compile_args = [] if cc.get_argument_syntax() == 'msvc' diff --git a/subprojects/rizin-shell-parser/meson.build b/subprojects/rizin-shell-parser/meson.build index 00055e25125..5ddc26ad3dd 100644 --- a/subprojects/rizin-shell-parser/meson.build +++ b/subprojects/rizin-shell-parser/meson.build @@ -1,7 +1,14 @@ project('rizin-shell-parser', 'c', - license : [ 'LGPL'] + license: 'LGPL-3.0-only', + meson_version: '>=0.55.0', ) +cc = meson.get_compiler('c') + +if cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif + tree_sitter_dep = dependency('tree-sitter') grammar_js = files('grammar.js') tree_sitter_wrap_py = files('meson_tree_sitter_generate.py') diff --git a/subprojects/rzar/meson.build b/subprojects/rzar/meson.build index 411e0d91e81..89c799b45da 100644 --- a/subprojects/rzar/meson.build +++ b/subprojects/rzar/meson.build @@ -1,5 +1,6 @@ project('rzar', 'c', - license : [ 'LGPL'] + license: 'LGPL-3.0-only', + meson_version: '>=0.55.0', ) # handle ar dependency @@ -7,6 +8,14 @@ ar_files = [ 'ar.c' ] +cc = meson.get_compiler('c') + +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif + rz_util_dep = dependency('rz_util') ar_inc = [include_directories(['.'])] diff --git a/subprojects/rzgdb/meson.build b/subprojects/rzgdb/meson.build index 9d3e67b835d..30425452222 100644 --- a/subprojects/rzgdb/meson.build +++ b/subprojects/rzgdb/meson.build @@ -1,5 +1,12 @@ project('rzw32dbg_wrap', 'c') +cc = meson.get_compiler('c') + +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif gdb_files = [ 'src/arch.c', diff --git a/subprojects/rzqnx/meson.build b/subprojects/rzqnx/meson.build index 500c4feb8d6..1cd2377638c 100644 --- a/subprojects/rzqnx/meson.build +++ b/subprojects/rzqnx/meson.build @@ -1,7 +1,16 @@ project('rzqnx', 'c', - license : [ 'GPL'] + license: 'GPL-2.0-only', + meson_version: '>=0.55.0', ) +cc = meson.get_compiler('c') + +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif + qnx_files = [ 'src/core.c', 'src/packet.c', diff --git a/subprojects/rzwinkd/meson.build b/subprojects/rzwinkd/meson.build index 6e869da632d..fcec9be6602 100644 --- a/subprojects/rzwinkd/meson.build +++ b/subprojects/rzwinkd/meson.build @@ -1,5 +1,6 @@ project('rzwinkd', 'c', - license : [ 'LGPL'] + license: 'LGPL-3.0-only', + meson_version: '>=0.55.0', ) cc = meson.get_compiler('c') @@ -12,6 +13,12 @@ winkd_files = [ 'winkd.c', ] +if cc.has_argument('--std=gnu99') + add_project_arguments('--std=gnu99', language: ['c']) +elif cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif + winkd_inc = [include_directories('.')] rz_util_dep = dependency('rz_util') diff --git a/subprojects/xxhash/meson.build b/subprojects/xxhash/meson.build index 4e53b58b6c9..51417eed228 100644 --- a/subprojects/xxhash/meson.build +++ b/subprojects/xxhash/meson.build @@ -1,7 +1,15 @@ project('xxhash', 'c', - # library files are BSD licensed. xxhsum utility is GPL licensed. - license : [ 'BSD', 'GPL'], - version : '0.6.5') + # library files are BSD licensed. xxhsum utility is GPL licensed. + version : '0.6.5', + license: 'BSD-2-Clause AND GPL-2.0-or-later', + meson_version: '>=0.55.0', +) + +cc = meson.get_compiler('c') + +if cc.has_argument('--std=c99') + add_project_arguments('--std=c99', language: ['c']) +endif inc = include_directories('.') @@ -13,4 +21,4 @@ libxxhash = library('xxhash', xxhash_dep = declare_dependency( include_directories : inc, - link_with : libxxhash) \ No newline at end of file + link_with : libxxhash) diff --git a/sys/meson_git_wrapper.py b/sys/meson_git_wrapper.py index 60d7213bc62..d3d7235330e 100755 --- a/sys/meson_git_wrapper.py +++ b/sys/meson_git_wrapper.py @@ -23,12 +23,10 @@ def isCArgSupported(executable, path): return False -def simple_git_execution(args, gittip_dir=None): +def simple_git_execution(args, output_path=None): try: called = subprocess.run(args, check=True, stdout=subprocess.PIPE) - if gittip_dir is not None: - os.chdir(gittip_dir) - with open("gittip", "w", encoding="utf8") as f: + with open(output_path, "w", encoding="utf8") as f: f.write(called.stdout.decode("utf8").strip()) sys.exit(called.returncode) except subprocess.CalledProcessError as e: @@ -38,7 +36,7 @@ def simple_git_execution(args, gittip_dir=None): def parse(): if len(sys.argv) <= 3: print( - "Usage: {} [git_args...]".format( + "Usage: {} [git_args...]".format( sys.argv[0] ) ) @@ -46,20 +44,21 @@ def parse(): git_exe = sys.argv[1] repo_path = sys.argv[2] - args = sys.argv[3:] + output_path = sys.argv[3] + args = sys.argv[4:] - return git_exe, repo_path, args + return git_exe, repo_path, output_path, args def main(): - git_exe, repo_path, args = parse() + git_exe, repo_path, output_path, args = parse() if isCArgSupported(git_exe, repo_path): - simple_git_execution([git_exe, "-C", repo_path] + args) + simple_git_execution([git_exe, "-C", repo_path] + args, output_path=output_path) else: - gittip_dir = os.getcwd() + out_abs_path = os.path.abspath(output_path) os.chdir(repo_path) - simple_git_execution([git_exe] + args, gittip_dir) + simple_git_execution([git_exe] + args, out_abs_path) if __name__ == "__main__": diff --git a/test/integration/meson.build b/test/integration/meson.build index aedd63018a0..4a9b00e0958 100644 --- a/test/integration/meson.build +++ b/test/integration/meson.build @@ -1,6 +1,10 @@ if get_option('enable_tests') test_conf_data = configuration_data() - test_conf_data.set_quoted('RIZIN_BUILD_PATH', rizin_exe.full_path()) + if cli_enabled + test_conf_data.set_quoted('RIZIN_BUILD_PATH', rizin_exe.full_path()) + else + test_conf_data.set_quoted('RIZIN_BUILD_PATH', meson.current_build_dir()) + endif test_conf_data.set_quoted('TEST_BUILD_TYPES_DIR', fs.as_posix(types_build_dir)) test_config_h = configure_file( input: 'test_config.h.in',