mirror of
https://github.com/rizinorg/rizin
synced 2026-08-22 20:26:16 -04:00
Enable subproject tree-sitter-c in librz/type (#4550)
This commit is contained in:
parent
fb384a4957
commit
3dcca03ced
2 changed files with 16 additions and 1 deletions
|
|
@ -18,7 +18,9 @@ if r.returncode() == 1 and get_option('subprojects_check')
|
|||
error('Subprojects are not updated. Please run `git clean -dxff subprojects/` to delete all local subprojects directories. If you want to compile against current subprojects then set option `subprojects_check=false`.')
|
||||
endif
|
||||
|
||||
tree_sitter_c_dep = dependency('tree-sitter-c')
|
||||
|
||||
# use subproject/tree-sitter-c
|
||||
# tree_sitter_c_dep = dependency('tree-sitter-c')
|
||||
|
||||
rz_type_inc = [
|
||||
platform_inc,
|
||||
|
|
|
|||
13
meson.build
13
meson.build
|
|
@ -300,6 +300,19 @@ if not tree_sitter_dep.found()
|
|||
meson.override_dependency('tree-sitter', tree_sitter_dep)
|
||||
endif
|
||||
|
||||
# handle tree-sitter-c
|
||||
r = run_command(py3_exe, check_meson_subproject_py, 'tree-sitter-c', check: false)
|
||||
if r.returncode() == 1 and get_option('subprojects_check')
|
||||
error(subproject_clean_error_msg)
|
||||
endif
|
||||
|
||||
tree_sitter_c_dep = dependency('tree-sitter-c', required: get_option('use_sys_tree_sitter'), static: is_static_build, fallback: [])
|
||||
if not tree_sitter_c_dep.found()
|
||||
tree_sitter_c_proj = subproject('tree-sitter-c', default_options: ['default_library=static'])
|
||||
tree_sitter_c_dep = tree_sitter_c_proj.get_variable('tree_sitter_c_dep')
|
||||
# override done in tree sitter c subproject
|
||||
endif
|
||||
|
||||
has_debugger = get_option('debugger')
|
||||
have_ptrace = not ['windows', 'cygwin', 'sunos', 'haiku'].contains(host_machine.system())
|
||||
use_ptrace_wrap = ['linux'].contains(host_machine.system())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue