From 9d298eb8067ff62a237203d1e1470785033e185c Mon Sep 17 00:00:00 2001 From: Zephyr Lykos Date: Mon, 7 Oct 2024 00:16:40 +0800 Subject: [PATCH] Add meson build system support (#525) --- .github/workflows/main.yml | 69 +++++- Doxyfile.meson.in | 25 +++ assets/version-bump-checklist.txt | 1 + dependencies/zycore | 2 +- dependencies/zycore.wrap | 10 + examples/meson.build | 28 +++ man/meson.build | 25 +++ meson.build | 339 ++++++++++++++++++++++++++++++ meson_options.txt | 87 ++++++++ resources/VersionInfo.rc | 2 +- subprojects | 1 + tests/meson.build | 34 +++ tools/meson.build | 85 ++++++++ 13 files changed, 698 insertions(+), 10 deletions(-) create mode 100644 Doxyfile.meson.in create mode 100644 dependencies/zycore.wrap create mode 100644 examples/meson.build create mode 100644 man/meson.build create mode 100644 meson.build create mode 100644 meson_options.txt create mode 120000 subprojects create mode 100644 tests/meson.build create mode 100644 tools/meson.build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8933ff9a..60d20328 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,14 +11,13 @@ jobs: name: >- CMake build + tests (${{ matrix.image_name }} ${{ matrix.cmake_flags }}) runs-on: ${{ matrix.image_name }} - strategy: fail-fast: false matrix: include: # Do a regular and a no-libc build for each platform. - - image_name: macOS-latest - - image_name: macOS-latest + - image_name: macos-latest + - image_name: macos-latest cmake_flags: -DZYAN_NO_LIBC=ON skip_tests: yes - image_name: windows-2022 @@ -39,7 +38,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: { submodules: recursive } - name: Configuring run: | @@ -53,16 +52,70 @@ jobs: cd build ctest -C Release --output-on-failure + meson-build-and-tests: + name: >- + Meson build + tests (${{ matrix.platform }}, ${{ matrix.flavor }} ${{ matrix.mode.name }}) + runs-on: ${{ matrix.platform }} + strategy: + fail-fast: false + matrix: + flavor: + - debug + - release + mode: + - { name: default, args: -Dtests=enabled } + - { name: NO_LIBC, args: -Dnolibc=true } + platform: + - macos-latest + - windows-2022 + - ubuntu-22.04 + extra_envs: + - {} + include: + # Do a few more specialized configurations. + - platform: ubuntu-22.04 + mode: + - name: minimal + args: -Dminimal=enabled -Ddecoder=enabled -Davx512=enabled -Dknc=enabled -Dsegment=enabled -Dtests=enabled + extra_envs: {} + flavor: minsize + exclude: + - platform: macos-latest + mode: { name: NO_LIBC, args: -Dnolibc=true } + + steps: + - name: Setup meson + run: | + pipx install meson ninja + - name: Checkout + uses: actions/checkout@v4 + with: { submodules: recursive } + - name: Activate MSVC and Configure + if: ${{ matrix.platform == 'windows-2022' }} + env: ${{ matrix.extra_envs }} + run: | + meson setup build-${{ matrix.flavor }} --buildtype=${{ matrix.flavor }} ${{ matrix.mode.args }} --vsenv + - name: Configuring + if: ${{ matrix.platform != 'windows-2022' }} + run: | + meson setup build-${{ matrix.flavor }} --buildtype=${{ matrix.flavor }} ${{ matrix.mode.args }} + - name: Building + run: | + meson compile -C build-${{ matrix.flavor }} + - name: Running tests + run: | + meson test -C build-${{ matrix.flavor }} + msbuild-build: name: MSBuild build (windows-2022) runs-on: windows-2022 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: { submodules: recursive } - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.1.3 - with: { vs-version: '[17,]' } + with: { vs-version: "[17,]" } - name: Build user-mode run: | cd msvc @@ -77,7 +130,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: { submodules: recursive } - name: Amalgamating sources run: | @@ -109,7 +162,7 @@ jobs: dry-run: false sanitizer: ${{ matrix.sanitizer }} - name: Upload Crash - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 if: failure() && steps.build.outcome == 'success' with: name: ${{ matrix.sanitizer }}-artifacts diff --git a/Doxyfile.meson.in b/Doxyfile.meson.in new file mode 100644 index 00000000..c4d31365 --- /dev/null +++ b/Doxyfile.meson.in @@ -0,0 +1,25 @@ +@INCLUDE = "@TOP_SRCDIR@/Doxyfile" +PROJECT_NUMBER = @VERSION@ +PROJECT_BRIEF = "Zyan Disassembler Library" +OUTPUT_DIRECTORY = "@TOP_BUILDDIR@/doc" +STRIP_FROM_PATH = "@TOP_SRCDIR@" +STRIP_FROM_INC_PATH = "@ZYCORE_INCLUDE_PATH@" +INPUT = "@TOP_SRCDIR@/include" \ + "@TOP_SRCDIR@/README.md" \ + "@TOP_SRCDIR@/files.dox" +EXAMPLE_PATH = "@TOP_SRCDIR@/examples" +USE_MDFILE_AS_MAINPAGE = "@TOP_SRCDIR@/README.md" +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +INCLUDE_PATH = "@ZYCORE_INCLUDE_PATH@" +PREDEFINED = @PREDEFINED@ +EXPAND_AS_DEFINED = ZYAN_BITFIELD +DOT_COMMON_ATTR = "fontname=\"sans-serif\",fontsize=10" +DOT_EDGE_ATTR = "labelfontname=\"sans-serif\",labelfontsize=10" +DOT_IMAGE_FORMAT = svg +INTERACTIVE_SVG = YES +HAVE_DOT = @HAVE_DOT@ +DOT_MULTI_TARGETS = @HAVE_DOT_1_8_10@ +DOT_PATH = "@DOT_PATH@" +HTML_FORMULA_FORMAT = @HTML_FORMULA_FORMAT@ + diff --git a/assets/version-bump-checklist.txt b/assets/version-bump-checklist.txt index 728634e1..9bee01bf 100644 --- a/assets/version-bump-checklist.txt +++ b/assets/version-bump-checklist.txt @@ -3,4 +3,5 @@ - resources/VersionInfo.rc (4 locations) - include/Zydis/Zydis.h (ZYDIS_VERSION macro) - create a tagged release of zycore +- sync revision in dependencies/zycore.wrap - create a tagged release of zydis diff --git a/dependencies/zycore b/dependencies/zycore index 419cde9e..38d4f028 160000 --- a/dependencies/zycore +++ b/dependencies/zycore @@ -1 +1 @@ -Subproject commit 419cde9e9246370935a351fb3cc80b02fbc6abd6 +Subproject commit 38d4f0285e6157ee840ea82a9b90aba71c8a705d diff --git a/dependencies/zycore.wrap b/dependencies/zycore.wrap new file mode 100644 index 00000000..ee43fe75 --- /dev/null +++ b/dependencies/zycore.wrap @@ -0,0 +1,10 @@ +[wrap-git] +# This is a fallback for plain clone (no submodules available). +url = https://github.com/zyantific/zycore-c.git +# Sync revision to `git submodule status zycore`. +# If doing a release for Zydis, sync both to a tagged commit. +revision = 38d4f0285e6157ee840ea82a9b90aba71c8a705d +depth = 1 + +[provide] +dependency_names = zycore diff --git a/examples/meson.build b/examples/meson.build new file mode 100644 index 00000000..aac81ff2 --- /dev/null +++ b/examples/meson.build @@ -0,0 +1,28 @@ +examples_req = examples.enabled() + +if examples_req + if decoder.enabled() and formatter.enabled() + executable('DisassembleSimple', 'DisassembleSimple.c', dependencies: [zydis_dep]) + executable('Disassemble', 'Disassemble.c', dependencies: [zydis_dep]) + executable('Formatter01', 'Formatter01.c', dependencies: [zydis_dep]) + executable('Formatter02', 'Formatter02.c', dependencies: [zydis_dep]) + executable('Formatter03', 'Formatter03.c', dependencies: [zydis_dep]) + executable( + 'ZydisPerfTest', + 'ZydisPerfTest.c', + c_args: host_machine.system() in ['linux', 'freebsd'] ? ['-D_GNU_SOURCE'] : [], + dependencies: [zydis_dep], + ) + endif + + if encoder.enabled() + executable('EncodeMov', 'EncodeMov.c', dependencies: [zydis_dep]) + executable('EncodeFromScratch', 'EncodeFromScratch.c', dependencies: [zydis_dep]) + executable('RewriteCode', 'RewriteCode.c', dependencies: [zydis_dep]) + endif +endif + +summary( + {'examples': examples_req}, + section: 'Features', +) diff --git a/man/meson.build b/man/meson.build new file mode 100644 index 00000000..eb82a16a --- /dev/null +++ b/man/meson.build @@ -0,0 +1,25 @@ +ronn_exe = find_program('ronn', required: man) +man_req = ronn_exe.found() + +if man_req + man_names = [ + 'ZydisDisasm.1', + 'ZydisInfo.1', + ] + + foreach page : man_names + custom_target( + page, + input: files(f'@page@.ronn'), + command: [ronn_exe, '--roff', '--output-dir', '@OUTDIR@', '@INPUT@'], + output: page, + install: true, + install_dir: datadir / 'man' / 'man1', + ) + endforeach +endif + +summary( + {'man': man_req}, + section: 'Features', +) diff --git a/meson.build b/meson.build new file mode 100644 index 00000000..3a78f629 --- /dev/null +++ b/meson.build @@ -0,0 +1,339 @@ +project( + 'Zydis', + 'c', + version: '4.0.0', + license: 'MIT', + license_files: 'LICENSE', + meson_version: '>=1.3', + default_options: [ + 'c_std=c11', + 'warning_level=3', + ], +) + +datadir = get_option('datadir') + +root = not meson.is_subproject() + +minimal = get_option('minimal') +decoder = get_option('decoder') +formatter = get_option('formatter') +avx512 = get_option('avx512') +knc = get_option('knc') +segment = get_option('segment') +encoder = get_option('encoder') + +examples = get_option('examples') +tools = get_option('tools') +man = get_option('man') +doc = get_option('doc') +tests = get_option('tests') + +nolibc = get_option('nolibc') + +# Auto feature set +encoder = encoder.enable_auto_if( + minimal.disabled() + and decoder.allowed() + and avx512.allowed() + and knc.allowed(), +) +decoder = decoder.enable_auto_if(encoder.enabled()) + +avx512 = avx512.enable_auto_if(encoder.enabled()) +knc = knc.enable_auto_if(encoder.enabled()) +segment = segment.enable_auto_if(decoder.enabled()) + +formatter = formatter.enable_auto_if( + decoder.enabled(), +) + +# Feature guards +minimal = minimal.disable_if(encoder.enabled()) +decoder = decoder.enable_if(encoder.enabled() or formatter.enabled()) +avx512 = avx512.enable_if(encoder.enabled()) +knc = knc.enable_if(encoder.enabled()) + +# Extra targets +examples = examples.disable_if(nolibc) +tools = tools.disable_if(nolibc) +tests = tests.disable_if(nolibc) + +examples = examples.disable_auto_if(not root).enable_auto_if(root) +tools = tools.disable_auto_if(not root).enable_auto_if(root) +tests = tests.disable_auto_if(not root) +man = man.disable_auto_if(not root) +doc = doc.disable_auto_if(not root) + +cc = meson.get_compiler('c') + +if cc.get_argument_syntax() == 'msvc' + if get_option('b_lto') + add_project_arguments( + '/GL', # -flto + language: 'c', + ) + add_project_link_arguments( + '/LTCG', + language: 'c', + ) + endif +elif nolibc + add_project_arguments( + '-fno-stack-protector', + language: 'c', + ) + add_project_link_arguments( + '-nostdlib', + '-nodefaultlibs', + language: 'c', + ) +endif + +if cc.get_linker_id() == 'ld.wasm' + emflags = ['-sEXPORT_NAME="Zydis"', '-sMODULARIZE=1'] + add_project_link_arguments( + emflags, + language: 'c', + ) +endif + +zycore_dep = dependency( + 'zycore', + version: '>=1.5.0', +) + +predef = [] + +if minimal.enabled() + predef += 'ZYDIS_MINIMAL_MODE' +endif +if decoder.disabled() + predef += 'ZYDIS_DISABLE_DECODER' +endif +if encoder.disabled() + predef += 'ZYDIS_DISABLE_ENCODER' +endif +if formatter.disabled() + predef += 'ZYDIS_DISABLE_FORMATTER' +endif +if avx512.disabled() + predef += 'ZYDIS_DISABLE_AVX512' +endif +if knc.disabled() + predef += 'ZYDIS_DISABLE_KNC' +endif +if segment.disabled() + predef += 'ZYDIS_DISABLE_SEGMENT' +endif + +foreach def : predef + add_project_arguments(f'-D@def@', language: 'c') +endforeach + +inc = include_directories('include') +inc_private = include_directories('src') + +hdrs_common = files( + 'include/Zydis/Defines.h', + 'include/Zydis/MetaInfo.h', + 'include/Zydis/Mnemonic.h', + 'include/Zydis/Register.h', + 'include/Zydis/SharedTypes.h', + 'include/Zydis/ShortString.h', + 'include/Zydis/Status.h', + 'include/Zydis/Utils.h', + 'include/Zydis/Zydis.h', +) + +hdrs_internal = files( + 'include/Zydis/Internal/SharedData.h', + 'include/Zydis/Internal/String.h', +) + +src = files( + 'src/MetaInfo.c', + 'src/Mnemonic.c', + 'src/Register.c', + 'src/SharedData.c', + 'src/String.c', + 'src/Utils.c', + 'src/Zydis.c', +) + +if decoder.enabled() + hdrs_common += files( + 'include/Zydis/Decoder.h', + 'include/Zydis/DecoderTypes.h', + ) + hdrs_internal += files( + 'include/Zydis/Internal/DecoderData.h', + ) + src += files( + 'src/Decoder.c', + 'src/DecoderData.c', + ) +endif + +if encoder.enabled() + hdrs_common += files( + 'include/Zydis/Encoder.h', + ) + hdrs_internal += files( + 'include/Zydis/Internal/EncoderData.h', + ) + src += files( + 'src/Encoder.c', + 'src/EncoderData.c', + ) +endif + +if formatter.enabled() + hdrs_common += files( + 'include/Zydis/Disassembler.h', + 'include/Zydis/Formatter.h', + 'include/Zydis/FormatterBuffer.h', + ) + hdrs_internal += files( + 'include/Zydis/Internal/FormatterATT.h', + 'include/Zydis/Internal/FormatterBase.h', + 'include/Zydis/Internal/FormatterIntel.h', + ) + src += files( + 'src/Disassembler.c', + 'src/Formatter.c', + 'src/FormatterATT.c', + 'src/FormatterBase.c', + 'src/FormatterBuffer.c', + 'src/FormatterIntel.c', + ) +endif + +if segment.enabled() + hdrs_common += files( + 'include/Zydis/Segment.h', + ) + src += files( + 'src/Segment.c', + ) +endif + +hdrs = hdrs_common + hdrs_internal + +if host_machine.system() == 'windows' + windows = import('windows') + src += windows.compile_resources('resources/VersionInfo.rc') +endif + +zydis_lib = library( + 'Zydis', + src + hdrs, + c_static_args: ['-DZYDIS_STATIC_BUILD'], + c_shared_args: ['-DZYDIS_SHOULD_EXPORT'], + include_directories: [inc, inc_private], + implicit_include_directories: false, + dependencies: [zycore_dep], + version: meson.project_version(), + install: true, +) + +install_headers(hdrs_common, subdir: 'Zydis') +install_headers(hdrs_internal, subdir: 'Zydis/Internal') + +# Note: on MSVC, define ZYDIS_STATIC_BUILD and ZYCORE_STATIC_BUILD accordingly +# in the user project. +zydis_dep = declare_dependency( + include_directories: inc, + link_with: zydis_lib, + dependencies: [zycore_dep], +) + +pkg = import('pkgconfig') +pkg.generate( + zydis_lib, + name: 'zydis', + description: 'Zyan Disassembler Library', + url: 'https://github.com/zyantific/zydis', +) + +meson.override_dependency('zydis', zydis_dep) + +subdir('examples') +subdir('tools') +subdir('tests') + +doxygen_exe = find_program('doxygen', required: doc) +doc_req = doxygen_exe.found() +if doc_req + cdata = configuration_data() + cdata.set('VERSION', meson.project_version()) + cdata.set('TOP_SRCDIR', meson.project_source_root()) + cdata.set('TOP_BUILDDIR', meson.project_build_root()) + + dot_exe = find_program('dot', required: false) + if dot_exe.found() + cdata.set('HAVE_DOT', 'YES') + cdata.set('DOT_PATH', dot_exe.full_path()) + cdata.set( + 'HAVE_DOT_1_8_10', + dot_exe.version().version_compare('>=1.8.10') ? 'YES' : 'NO', + ) + else + cdata.set('HAVE_DOT', 'NO') + endif + + if find_program('pdf2svg', required: false).found() or find_program('inkscape', required: false).found() + cdata.set('HTML_FORMULA_FORMAT', 'svg') + else + cdata.set('HTML_FORMULA_FORMAT', 'png') + endif + + cdata.set('PREDEFINED', ' '.join(predef)) + cdata.set( + 'ZYCORE_INCLUDE_PATH', + # We don't care if the directory exists or not + meson.project_source_root() / 'subprojects/zycore/include', + ) + + doxyfile = configure_file( + input: 'Doxyfile.meson.in', + output: 'Doxyfile', + configuration: cdata, + install: false, + ) + + custom_target( + 'ZydisDoc', + input: doxyfile, + output: 'doc', + command: [doxygen_exe, doxyfile], + depend_files: [hdrs, files('Doxyfile')], + install: true, + install_dir: datadir / 'doc' / 'Zydis', + ) + + summary( + { + 'dot': cdata.get('HAVE_DOT') == 'YES', + 'formula format': cdata.get('HTML_FORMULA_FORMAT'), + }, + section: 'Doxygen', + ) +endif + +subdir('man') + +summary( + { + 'doc': doc_req, + 'nolibc': nolibc, + 'minimal': minimal, + 'decoder': decoder, + 'formatter': formatter, + 'avx512': avx512, + 'knc': knc, + 'segment': segment, + 'encoder': encoder, + }, + section: 'Features', +) diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000..b228dffd --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,87 @@ +option( + 'minimal', + type: 'feature', + value: 'disabled', + description: 'Enable minimal mode (forces ZYDIS_DECODER_MODE_MINIMAL runtime option)', +) +option( + 'decoder', + type: 'feature', + value: 'auto', + description: 'Enable instruction decoding functionality', +) +option( + 'encoder', + type: 'feature', + value: 'auto', + description: 'Enable instruction encoding functionality', +) +option( + 'formatter', + type: 'feature', + value: 'auto', + description: 'Enable instruction formatting functionality', +) +option( + 'avx512', + type: 'feature', + value: 'auto', + description: 'Enable support for AVX-512 instructions', +) +option( + 'knc', + type: 'feature', + value: 'auto', + description: 'Enable support for KNC instructions', +) +option( + 'segment', + type: 'feature', + value: 'auto', + description: 'Enable instruction segment API', +) + +option( + 'examples', + type: 'feature', + value: 'auto', + description: 'Build examples', +) +option( + 'tools', + type: 'feature', + value: 'auto', + description: 'Build tools', +) +option( + 'man', + type: 'feature', + value: 'auto', + description: 'Build manpages for the tools (requires Ronn-NG)', +) +option( + 'doc', + type: 'feature', + value: 'auto', + description: 'Build doxygen documentation (requires Doxygen)', +) +option( + 'tests', + type: 'feature', + value: 'auto', + description: 'Build tests', +) + +option( + 'nolibc', + type: 'boolean', + value: false, + description: 'Do not use any C standard library functions (for exotic build-envs like kernel drivers)', +) + +option( + 'llvm-fuzz', + type: 'boolean', + value: false, + description: 'Enables LLVM libfuzzer mode and reduces prints in ZydisFuzzIn', +) diff --git a/resources/VersionInfo.rc b/resources/VersionInfo.rc index 56e6d337..3894ccf7 100644 --- a/resources/VersionInfo.rc +++ b/resources/VersionInfo.rc @@ -47,7 +47,7 @@ BEGIN VALUE "FileDescription", "Zyan Disassembler Library" VALUE "FileVersion", "4.0.0.0" VALUE "InternalName", "Zydis" - VALUE "LegalCopyright", "Copyright (C) 2014-2024 by zyantific.com" + VALUE "LegalCopyright", "Copyright \xA9 2014-2024 by zyantific.com" VALUE "OriginalFilename", "Zydis.dll" VALUE "ProductName", "Zyan Disassembler Library" VALUE "ProductVersion", "4.0.0.0" diff --git a/subprojects b/subprojects new file mode 120000 index 00000000..8921da87 --- /dev/null +++ b/subprojects @@ -0,0 +1 @@ +dependencies/ \ No newline at end of file diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 00000000..2e9863ef --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,34 @@ +pymod = import('python') +py_exe = pymod.find_installation('python3', required: tests) + +tests_req = py_exe.found() + +if tests_req + test( + 'ZydisRegression', + py_exe, + args: [ + files('regression.py'), + 'test', + zydisinfo_exe, + ], + workdir: meson.current_source_dir(), + ) + + test( + 'ZydisRegressionEncoder', + py_exe, + args: [ + files('regression_encoder.py'), + zydisfuzzreencoding_exe, + zydisfuzzencoder_exe, + zydistestencoderabsolute_exe, + ], + workdir: meson.current_source_dir(), + ) +endif + +summary( + {'tests': tests_req}, + section: 'Features', +) diff --git a/tools/meson.build b/tools/meson.build new file mode 100644 index 00000000..9fee86e7 --- /dev/null +++ b/tools/meson.build @@ -0,0 +1,85 @@ +tools_req = tools.enabled() + +llvm_fuzz = get_option('llvm-fuzz') + +zydisinfo_exe = disabler() +zydisfuzzdecoder_exe = disabler() +zydisfuzzencoder_exe = disabler() +zydisfuzzreencoding_exe = disabler() +zydistestencoderabsolute_exe = disabler() +if tools_req + if decoder.enabled() and formatter.enabled() and minimal.disabled() + executable( + 'ZydisDisasm', + files( + 'ZydisDisasm.c', + 'ZydisToolsShared.c', + 'ZydisToolsShared.h', + ), + dependencies: [zydis_dep], + install: true, + ) + + zydisfuzzdecoder_exe = executable( + 'ZydisFuzzDecoder', + files( + 'ZydisFuzzDecoder.c', + 'ZydisFuzzShared.c', + 'ZydisFuzzShared.h', + ), + dependencies: [zydis_dep], + c_args: llvm_fuzz ? ['-DZYDIS_LIBFUZZER'] : [], + ) + + if encoder.enabled() + zydisfuzzencoder_exe = executable( + 'ZydisFuzzEncoder', + files( + 'ZydisFuzzEncoder.c', + 'ZydisFuzzShared.c', + 'ZydisFuzzShared.h', + ), + dependencies: [zydis_dep], + c_args: llvm_fuzz ? ['-DZYDIS_LIBFUZZER'] : [], + ) + zydisfuzzreencoding_exe = executable( + 'ZydisFuzzReEncoding', + files( + 'ZydisFuzzReEncoding.c', + 'ZydisFuzzShared.c', + 'ZydisFuzzShared.h', + ), + dependencies: [zydis_dep], + c_args: llvm_fuzz ? ['-DZYDIS_LIBFUZZER'] : [], + ) + zydistestencoderabsolute_exe = executable( + 'ZydisTestEncoderAbsolute', + files( + 'ZydisTestEncoderAbsolute.c', + ), + src + hdrs, + c_args: ['-DZYDIS_STATIC_BUILD'], + include_directories: [inc, inc_private], + implicit_include_directories: false, + dependencies: [zycore_dep], + build_by_default: false, + ) + endif + + zydisinfo_exe = executable( + 'ZydisInfo', + files( + 'ZydisInfo.c', + 'ZydisToolsShared.c', + 'ZydisToolsShared.h', + ), + dependencies: [zydis_dep], + install: true, + ) + endif +endif + +summary( + {'tools': tools_req, 'llvm-fuzz': llvm_fuzz}, + section: 'Features', +)