aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-03 17:13:05 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-03 17:13:05 +0000
commit7025d2cc327ec75353454586df2987afce5e5789 (patch)
treedb5cbf9183a44b7dea4d5d5fe0958d496b2fc5db /lib/Driver/Tools.cpp
parent752c74d99b647710a495c2ff5f815c30a30c3264 (diff)
Add -fno-modules to the driver, to turn off modules (although they're off by default anyway).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index b7379e72ea..566ea1edaa 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -395,8 +395,6 @@ void Clang::AddPreprocessingOptions(Compilation &C,
CmdArgs.push_back(Args.MakeArgString(DefaultModuleCache));
}
- Args.AddAllArgs(CmdArgs, options::OPT_fmodules);
-
// Parse additional include paths from environment variables.
// FIXME: We should probably sink the logic for handling these from the
// frontend into the driver. It will allow deleting 4 otherwise unused flags.
@@ -2023,6 +2021,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-fblocks-runtime-optional");
}
+ if (Args.hasFlag(options::OPT_fmodules, options::OPT_fno_modules, false))
+ CmdArgs.push_back("-fmodules");
+
// -faccess-control is default.
if (Args.hasFlag(options::OPT_fno_access_control,
options::OPT_faccess_control,