aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2015-02-20 11:44:41 +0000
committerManuel Klimek <klimek@google.com>2015-02-20 11:44:41 +0000
commitd2e8b04d6111dd6d59bc0cc43dc47a805f7ca606 (patch)
treef14c0f102d1666216779cd0935edf32a6fa8a8bd /clang/lib/Driver/Tools.cpp
parentc95f7e2a7cf103597bf5a002f021c24482a9ecea (diff)
downloadllvm-d2e8b04d6111dd6d59bc0cc43dc47a805f7ca606.zip
llvm-d2e8b04d6111dd6d59bc0cc43dc47a805f7ca606.tar.gz
llvm-d2e8b04d6111dd6d59bc0cc43dc47a805f7ca606.tar.bz2
Add -fno-implicit-modules.
If this flag is set, we error out when a module build is required. This is useful in environments where all required modules are passed via -fmodule-file. llvm-svn: 230006
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index fc6773d..b5f2060 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -3925,6 +3925,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-fmodules-strict-decluse");
}
+ // -fno-implicit-modules turns off implicitly compiling modules on demand.
+ if (!Args.hasFlag(options::OPT_fimplicit_modules,
+ options::OPT_fno_implicit_modules)) {
+ CmdArgs.push_back("-fno-implicit-modules");
+ }
+
// -fmodule-name specifies the module that is currently being built (or
// used for header checking by -fmodule-maps).
Args.AddLastArg(CmdArgs, options::OPT_fmodule_name);