Skip to content

Commit aa4544f

Browse files
Handle externalwarnings in the clang toolset (#2803)
1 parent 6a6f398 commit aa4544f

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

‎src/tools/clang.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
vectorextensions = gcc.shared.vectorextensions,
6464
isaextensions = gcc.shared.isaextensions,
6565
warnings = gcc.shared.warnings,
66+
externalwarnings = gcc.shared.externalwarnings,
6667
symbols = gcc.shared.symbols,
6768
unsignedchar = gcc.shared.unsignedchar,
6869
omitframepointer = gcc.shared.omitframepointer,

‎tests/tools/test_clang.lua‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,22 @@ end
365365
test.contains({ "-ffp-model=precise" }, clang.getcflags(cfg))
366366
end
367367

368+
--
369+
-- Check handling of external warnings.
370+
--
371+
372+
function suite.cflags_onNoExternalWarnings()
373+
externalwarnings "Off"
374+
prepare()
375+
test.excludes({ "-Wsystem-headers" }, clang.getcflags(cfg))
376+
end
377+
378+
function suite.cflags_onHighExternalWarnings()
379+
externalwarnings "High"
380+
prepare()
381+
test.contains({ "-Wsystem-headers" }, clang.getcflags(cfg))
382+
end
383+
368384
--
369385
-- Test profiling flag
370386
--

0 commit comments

Comments
 (0)