diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-02-07 00:21:12 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-02-07 00:21:12 +0000 |
commit | 5dc3899ca417b344a272c109837f62a7ac840235 (patch) | |
tree | a06b291ccb8b24a25a3239cb21689a36c6a70853 /clang/lib/Driver/Tools.cpp | |
parent | 0588b509af71eda6956e674363f86bfb67b2e976 (diff) | |
download | bcm5719-llvm-5dc3899ca417b344a272c109837f62a7ac840235.tar.gz bcm5719-llvm-5dc3899ca417b344a272c109837f62a7ac840235.zip |
Introduce -fmodules-ignore-macro=NNN to ignore a macro when building/loading modules.
The use of this flag enables a modules optimization where a given set
of macros can be labeled as "ignored" by the modules
system. Definitions of those macros will be completely ignored when
building the module hash and will be stripped when actually building
modules. The overall effect is that this flag can be used to
drastically reduce the number of
Eventually, we'll want modules to tell us what set of macros they
respond to (the "configuration macros"), and anything not in that set
will be excluded. However, that requires a lot of per-module
information that must be accurate, whereas this option can be used
more readily.
Fixes the rest of <rdar://problem/13165109>.
llvm-svn: 174560
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 71e50a5c9e5..7932ba28271 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -428,6 +428,9 @@ void Clang::AddPreprocessingOptions(Compilation &C, CmdArgs.push_back("-fmodule-cache-path"); CmdArgs.push_back(Args.MakeArgString(DefaultModuleCache)); } + + // Pass through all -fmodules-ignore-macro arguments. + Args.AddAllArgs(CmdArgs, options::OPT_fmodules_ignore_macro); // Parse additional include paths from environment variables. // FIXME: We should probably sink the logic for handling these from the |