diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdf2658b080..5168346553c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,7 +68,7 @@ jobs: build_system: meson compiler: clang run_tests: true - meson_options: -Dbuildtype=release + meson_options: -Dbuildtype=release --werror enabled: ${{ (github.event_name != 'pull_request' || contains(github.head_ref, 'clang')) && needs.changes.outputs.edited == 'true' }} timeout: 45 allow_failure: false @@ -108,7 +108,7 @@ jobs: build_system: meson compiler: clang cflags: '-DRZ_ASSERT_STDOUT=1 -Wno-cpp' - meson_options: -Dbuildtype=debugoptimized -Db_lundef=false -Db_sanitize=address,undefined -Duse_webui=true + meson_options: -Dbuildtype=debugoptimized -Db_lundef=false -Db_sanitize=address,undefined -Duse_webui=true --werror asan: true asan_options: 'detect_leaks=0,detect_odr_violation=0,allocator_may_return_null=1' run_tests: true diff --git a/subprojects/packagefiles/capstone-bundled/meson.build b/subprojects/packagefiles/capstone-bundled/meson.build index fc57f5a9b0a..34961855f32 100644 --- a/subprojects/packagefiles/capstone-bundled/meson.build +++ b/subprojects/packagefiles/capstone-bundled/meson.build @@ -73,7 +73,11 @@ libcapstone_c_args = [ '-DCAPSTONE_HAS_X86', '-DCAPSTONE_HAS_XCORE', '-DCAPSTONE_HAS_TMS320C64X', -] +] +warn_unneeded_flag = '-Wno-error=unneeded-internal-declaration' +if meson.get_compiler('c').has_argument(warn_unneeded_flag) + libcapstone_c_args += warn_unneeded_flag +endif libcapstone = library('capstone', cs_files, c_args: libcapstone_c_args,