Skip to contentSkip to conversation

build: improve -fsanitize-coverage-allowlist check

PATCH Applied Alexander Bulekov 2 participants 2 messages Jun 21, 2022 – Jun 22, 2022 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: improve -fsanitize-coverage-allowlist check

The sancov filter check still fails when unused arguments are treated as errors. To work around that, add a SanitizerCoverage flag to the build-check.

Fixes aa4f3a3b88 ("build: fix check for -fsanitize-coverage-allowlist")
---
 meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meson.build +2 -1
index 9efcb175d1..1b255f91ef 100644
@@ -212,7 +212,8 @@ if get_option('fuzzing')
 
   if cc.compiles('int main () { return 0; }',
                   name: '-fsanitize-coverage-allowlist=/dev/null',
-                 args: ['-fsanitize-coverage-allowlist=/dev/null'] )
+                 args: ['-fsanitize-coverage-allowlist=/dev/null',
+                        '-fsanitize-coverage=trace-pc'] )
     add_global_arguments('-fsanitize-coverage-allowlist=instrumentation-filter',
                          native: false, language: ['c', 'cpp', 'objc'])
   endif
Signature · 1 line
2.27.0