From: Hans Wennborg Date: Tue, 4 Oct 2016 21:00:57 +0000 (+0000) Subject: clang-cl: Expose the -flto option X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ca3724b005203a78f37a55cbafd792d8058678f;p=clang clang-cl: Expose the -flto option We could hook up /GL as an alias for -flto, but that might be confusing, as clang-cl in that mode would not be drop-in compatible with cl.exe /GL, as it requires the linker to be lld. Exposing -flto seems like a less confusing way to expose this functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283255 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 80ec594615..d3de24b660 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -815,7 +815,7 @@ def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group; -def flto : Flag<["-"], "flto">, Flags<[CC1Option]>, Group, +def flto : Flag<["-"], "flto">, Flags<[CoreOption, CC1Option]>, Group, HelpText<"Enable LTO in 'full' mode">; def fno_lto : Flag<["-"], "fno-lto">, Group, HelpText<"Disable LTO mode (default)">; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index 4e99ff8467..ec0bd572ba 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -521,6 +521,7 @@ // RUN: -fmacro-backtrace-limit=0 \ // RUN: -fstandalone-debug \ // RUN: -flimit-debug-info \ +// RUN: -flto \ // RUN: -Werror /Zs -- %s 2>&1