diff options
author | Manuel Klimek <klimek@google.com> | 2015-02-20 11:44:41 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2015-02-20 11:44:41 +0000 |
commit | d2e8b04d6111dd6d59bc0cc43dc47a805f7ca606 (patch) | |
tree | f14c0f102d1666216779cd0935edf32a6fa8a8bd /clang/lib/Driver/Tools.cpp | |
parent | c95f7e2a7cf103597bf5a002f021c24482a9ecea (diff) | |
download | llvm-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.cpp | 6 |
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); |