Page MenuHomePhabricator

[Driver] Fix handling of -fbuiltin/-fcommon when combined with -mkernel

Authored by john.brawn on Jul 23 2015, 6:48 AM.



-mkernel enables -fno-builtin and -fno-common by default, but allows -fbuiltin and -fcommon to override that. However "-fbuiltin -fno-builtin" is treated the same as "-fbuiltin" which is wrong, so fix that. Also fixes similar behaviour when -fno-common is default.

Diff Detail


Event Timeline

john.brawn updated this revision to Diff 30478.Jul 23 2015, 6:48 AM
john.brawn retitled this revision from to [Driver] Fix handling of -fbuiltin/-fcommon when combined with -mkernel.
john.brawn updated this object.
john.brawn added reviewers: ddunbar, mcrosier.
john.brawn set the repository for this revision to rL LLVM.
john.brawn added a subscriber: cfe-commits.

The change looks right to me (but I'm not in a position to approve committing).

[I do have to admit I don't understand why -mkernel && isCXX() => -fapple-kext. But that's part of the original behaviour and has been preserved.]

mcrosier edited reviewers, added: bob.wilson; removed: mcrosier.Aug 5 2015, 7:39 AM
mcrosier added a subscriber: mcrosier.
This revision was automatically updated to reflect the committed changes.