diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-03 17:13:05 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-03 17:13:05 +0000 |
commit | 7025d2cc327ec75353454586df2987afce5e5789 (patch) | |
tree | db5cbf9183a44b7dea4d5d5fe0958d496b2fc5db | |
parent | 752c74d99b647710a495c2ff5f815c30a30c3264 (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
-rw-r--r-- | include/clang/Driver/Options.td | 1 | ||||
-rw-r--r-- | lib/Driver/Tools.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index e3b50c4582..9d3cae1e85 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -417,6 +417,7 @@ def fno_lax_vector_conversions : Flag<"-fno-lax-vector-conversions">, Group<f_Gr def fno_limit_debug_info : Flag<"-fno-limit-debug-info">, Group<f_Group>, HelpText<"Do not limit debug information produced to reduce size of debug binary">; def fno_merge_all_constants : Flag<"-fno-merge-all-constants">, Group<f_Group>; +def fno_modules : Flag <"-fno-modules">, Group<f_Group>, Flags<[NoForward]>; def fno_ms_extensions : Flag<"-fno-ms-extensions">, Group<f_Group>; def fno_ms_compatibility : Flag<"-fno-ms-compatibility">, Group<f_Group>; def fno_delayed_template_parsing : Flag<"-fno-delayed-template-parsing">, Group<f_Group>; 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, |