MESON_ARGS+=(-Db_lundef=false -Dfuzz-tests=true)
if [[ "$phase" == "RUN_CLANG_ASAN_UBSAN_NO_DEPS" ]]; then
- MESON_ARGS+=(-Dskip-deps=true)
+ MESON_ARGS+=(--auto-features=disabled)
fi
fi
MESON_ARGS+=(--fatal-meson-warnings)
error('only one of oss-fuzz or llvm-fuzz can be specified')
endif
-skip_deps = want_ossfuzz or get_option('skip-deps')
fuzzer_build = want_ossfuzz or want_libfuzzer
# If we're building *not* for actual fuzzing, allow input samples of any size
conf.set10('DNS_OVER_TLS_USE_OPENSSL', have_openssl)
default_dns_over_tls = get_option('default-dns-over-tls')
-if skip_deps
- default_dns_over_tls = 'no'
-endif
if default_dns_over_tls != 'no' and conf.get('ENABLE_DNS_OVER_TLS') == 0
message('default-dns-over-tls cannot be enabled or set to opportunistic when DNS-over-TLS support is disabled. Setting default-dns-over-tls to no.')
default_dns_over_tls = 'no'
conf.set10('ENABLE_REPART', have)
default_dnssec = get_option('default-dnssec')
-if skip_deps
- default_dnssec = 'no'
-endif
if default_dnssec != 'no' and conf.get('HAVE_OPENSSL_OR_GCRYPT') == 0
message('default-dnssec cannot be set to yes or allow-downgrade openssl and gcrypt are disabled. Setting default-dnssec to no.')
default_dnssec = 'no'
description: 'compiler used to build BPF programs')
option('bpf-framework', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
description: 'build BPF programs from source code in restricted C')
-
-option('skip-deps', type : 'boolean', value : false,
- description : 'skip optional dependencies')
############################################################
+# TODO: Use native string formatting with meson >= 1.3.0
+if get_option('auto_features').enabled()
+ sanitize_auto_features = 'enabled'
+elif get_option('auto_features').disabled()
+ sanitize_auto_features = 'disabled'
+else
+ sanitize_auto_features = 'auto'
+endif
+
sanitize_address_undefined = custom_target(
'sanitize-address-undefined-fuzzers',
output : 'sanitize-address-undefined-fuzzers',
project_source_root,
'@OUTPUT@',
'fuzzers',
- '-Dfuzz-tests=true -Db_lundef=false -Db_sanitize=address,undefined --optimization=@0@ @1@ -Dc_args=@2@ -Dcpp_args=@2@ -Dskip-deps=@3@'.format(
+ '-Dfuzz-tests=true -Db_lundef=false -Db_sanitize=address,undefined --optimization=@0@ @1@ -Dc_args=@2@ -Dcpp_args=@2@ --auto-features=@3@'.format(
get_option('optimization'),
get_option('werror') ? '--werror' : '',
'-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION',
- get_option('skip-deps')
+ sanitize_auto_features
),
' '.join(cc.cmd_array()),
cxx_cmd])
rm -rf "$build"
mkdir -p "$build"
+meson_args=("-Db_lundef=false")
+
if [ -z "$FUZZING_ENGINE" ]; then
- fuzzflag="llvm-fuzz=true"
+ meson_args+=("-Dllvm-fuzz=true")
else
- fuzzflag="oss-fuzz=true"
+ meson_args+=("-Doss-fuzz=true" "--auto-features=disabled")
apt-get update
apt-get install -y gperf m4 gettext python3-pip \
fi
fi
-if ! meson setup "$build" "-D$fuzzflag" -Db_lundef=false; then
+if ! meson setup "$build" "${meson_args[@]}"; then
cat "$build/meson-logs/meson-log.txt"
exit 1
fi