Author: hans Date: Tue Oct 4 16:00:57 2016 New Revision: 283255 URL: http://llvm.org/viewvc/llvm-project?rev=283255&view=rev Log: 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. Modified: cfe/trunk/include/clang/Driver/Options.td cfe/trunk/test/Driver/cl-options.c Modified: cfe/trunk/include/clang/Driver/Options.td URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=283255&r1=283254&r2=283255&view=diff ============================================================================== --- cfe/trunk/include/clang/Driver/Options.td (original) +++ cfe/trunk/include/clang/Driver/Options.td Tue Oct 4 16:00:57 2016 @@ -815,7 +815,7 @@ def flax_vector_conversions : Flag<["-"] def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>; def flto_EQ : Joined<["-"], "flto=">, Flags<[CC1Option]>, Group<f_Group>, HelpText<"Set LTO mode to either 'full' or 'thin'">; -def flto : Flag<["-"], "flto">, Flags<[CC1Option]>, Group<f_Group>, +def flto : Flag<["-"], "flto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>, HelpText<"Enable LTO in 'full' mode">; def fno_lto : Flag<["-"], "fno-lto">, Group<f_Group>, HelpText<"Disable LTO mode (default)">; Modified: cfe/trunk/test/Driver/cl-options.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=283255&r1=283254&r2=283255&view=diff ============================================================================== --- cfe/trunk/test/Driver/cl-options.c (original) +++ cfe/trunk/test/Driver/cl-options.c Tue Oct 4 16:00:57 2016 @@ -521,6 +521,7 @@ // RUN: -fmacro-backtrace-limit=0 \ // RUN: -fstandalone-debug \ // RUN: -flimit-debug-info \ +// RUN: -flto \ // RUN: -Werror /Zs -- %s 2>&1 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits