]> granicus.if.org Git - clang/commitdiff
Driver: Support -fno-lto.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 18 Apr 2011 19:44:09 +0000 (19:44 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 18 Apr 2011 19:44:09 +0000 (19:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129712 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
lib/Driver/Driver.cpp

index 8f4a250cadd363b3441db41edc21d5bb9f8a19b6..9a29e349f1cf799c2f4fcf3e217b1d4eefc6301f 100644 (file)
@@ -305,6 +305,7 @@ def flimit_debug_info : Flag<"-flimit-debug-info">, Group<f_Group>,
   HelpText<"Limit debug information produced to reduce size of debug binary">;
 def flimited_precision_EQ : Joined<"-flimited-precision=">, Group<f_Group>;
 def flto : Flag<"-flto">, Group<f_Group>;
+def fno_lto : Flag<"-fno-lto">, Group<f_Group>;
 def fmacro_backtrace_limit_EQ : Joined<"-fmacro-backtrace-limit=">,
                                 Group<f_Group>;
 def fmath_errno : Flag<"-fmath-errno">, Group<f_Group>;
index a3c93bd88c9d316e64396c40b2690ed3a8527b75..39ace114e6359562b4b8fd7dd28c7c293fac5193 100644 (file)
@@ -950,7 +950,8 @@ Action *Driver::ConstructPhaseAction(const ArgList &Args, phases::ID Phase,
     } else if (Args.hasArg(options::OPT_emit_ast)) {
       return new CompileJobAction(Input, types::TY_AST);
     } else if (Args.hasArg(options::OPT_emit_llvm) ||
-               Args.hasArg(options::OPT_flto) || HasO4) {
+               Args.hasFlag(options::OPT_flto, options::OPT_fno_lto, false) ||
+               HasO4) {
       types::ID Output =
         Args.hasArg(options::OPT_S) ? types::TY_LTO_IR : types::TY_LTO_BC;
       return new CompileJobAction(Input, Output);