[PATCH] D75395: [clang][Modules] Add -fsystem-module flag

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 15:53:49 PST 2020


dexonsmith added a comment.

In D75395#1901859 <https://reviews.llvm.org/D75395#1901859>, @Bigcheese wrote:

> In D75395#1901778 <https://reviews.llvm.org/D75395#1901778>, @dexonsmith wrote:
>
> > > This is used when
> > >  converting an implicit build to an explicit build to match the
> > >  systemness the implicit build would have had for a given module.
> >
> > I had another thought.  What if for the explicitly built "system" modules:
> >
> > - If `-Wsystem-headers` is on, leave them as user modules in the explicit build.
> > - If `-Wsystem-headers` is off, turn off all diagnostics in the explicit build.
> >
> >   Does that give the right semantics, or is there something subtly different?
>
>
> I considered this, but decided against it because I wanted the implicit and explicit builds to be as similar as possible, and reduce the amount of changes made to the original command line. There's a lot of code in Clang dealing with system files, and I'm not 100% sure that -Wno-everything would be equivalent.


Okay, SGTM.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75395/new/

https://reviews.llvm.org/D75395





More information about the cfe-commits mailing list