Page MenuHomePhabricator

[libcxx] Add special warning flag detection logic to compiler.py
ClosedPublic

Authored by EricWF on Jul 18 2015, 9:25 PM.

Details

Summary

Detecting -Wno-<warning> flags can be tricky with GCC (See https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html). This patch adds a special addWarningFlagIfSupported(<flag>) method to the test compiler object that can be used to add warning flags. The goal of this patch is to help get the test suite running with more warnings.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 30104.Jul 18 2015, 9:25 PM
EricWF retitled this revision from to [libcxx] Add special warning flag detection logic to compiler.py.
EricWF updated this object.
EricWF added reviewers: danalbert, jroelofs.
EricWF added a subscriber: cfe-commits.
jroelofs edited edge metadata.Aug 26 2015, 12:26 PM

the addWarningFlagIfSupported part of this patch LGTM.

test/libcxx/compiler.py
88

this looks unused to me.

105

this looks unused to me.

Those methods are currently unused but are you opposed to me adding them in this patch? They will be useful for compiling short tests to check for compiler features.

I'd say put them in when you have actual uses for them....

test/libcxx/compiler.py
195

... you could at least use compileString here.

EricWF updated this revision to Diff 33236.Aug 26 2015, 12:58 PM
EricWF edited edge metadata.

Remove unused "CompileString" functions. The reason they can't be used to implement addWarningFlagIfSupported is because we have to fuss with the flags before invoking the compiler .

jroelofs accepted this revision.Aug 26 2015, 1:00 PM
jroelofs edited edge metadata.
This revision is now accepted and ready to land.Aug 26 2015, 1:00 PM
EricWF closed this revision.Aug 26 2015, 1:18 PM