Add option to use system BLAKE3 (#5414)

This commit is contained in:
Zephyr Lykos 2025-09-28 13:11:33 +08:00 committed by GitHub
parent a60c32b46e
commit fef5cb03fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View file

@ -87,6 +87,7 @@ At the time of writing, these are:
* `use_sys_tree_sitter`
* `use_sys_softfloat`
* `use_sys_zydis`
* `use_sys_blake3`
See [meson_options.txt][] for a complete list of compile-time options.

View file

@ -310,8 +310,11 @@ libdemangle_proj = subproject('libdemangle', default_options: libdemangle_option
libdemangle_dep = libdemangle_proj.get_variable('libdemangle_dep')
# handle blake3 algo
blake3_proj = subproject('blake3', default_options: ['default_library=static', 'werror=false'])
blake3_dep = blake3_proj.get_variable('blake3_dep')
blake3_dep = dependency('libblake3', required: get_option('use_sys_blake3'), static: is_static_build)
if not blake3_dep.found()
blake3_proj = subproject('blake3', default_options: ['default_library=static', 'werror=false'])
blake3_dep = blake3_proj.get_variable('blake3_dep')
endif
# handle openssl library
sys_openssl = dependency('openssl', required: get_option('use_sys_openssl'), static: is_static_build)
@ -842,6 +845,7 @@ summary({
'System zlib library': zlib_dep.found() and zlib_dep.type_name() != 'internal',
'System zstd library': libzstd_dep.found() and libzstd_dep.type_name() != 'internal',
'System zip library': libzip_dep.found() and libzip_dep.type_name() != 'internal',
'System blake3 library': blake3_dep.found() and blake3_dep.type_name() != 'internal',
'Use ptrace-wrap': use_ptrace_wrap,
'Use RPATH': rpath_summary,
}, section: 'Configuration', bool_yn: true)

View file

@ -38,6 +38,7 @@ option('use_sys_libmspack', type: 'feature', value: 'disabled')
option('use_sys_tree_sitter', type: 'feature', value: 'disabled')
option('use_sys_pcre2', type: 'feature', value: 'disabled')
option('use_sys_softfloat', type: 'feature', value: 'disabled')
option('use_sys_blake3', type: 'feature', value: 'disabled')
option('use_gpl', type: 'boolean', value: true, description: 'Set to false when you want to disable gpl code')
option('install_sigdb', type: 'boolean', value: false, description: 'Downloads and installs rizin sigdb')
option('debugger', type: 'boolean', value: true)