diff options
| author | Hans Wennborg <hans@hanshq.net> | 2016-10-04 21:00:57 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2016-10-04 21:00:57 +0000 |
| commit | 02d03befb92d4613994a5be23effa5650116cf16 (patch) | |
| tree | 3687c47f293307384b573bcc59d3109daad7f1a0 | |
| parent | 7c7ee89b01e995f03cd792dd106648e47457b56c (diff) | |
| download | bcm5719-llvm-02d03befb92d4613994a5be23effa5650116cf16.tar.gz bcm5719-llvm-02d03befb92d4613994a5be23effa5650116cf16.zip | |
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.
llvm-svn: 283255
| -rw-r--r-- | clang/include/clang/Driver/Options.td | 2 | ||||
| -rw-r--r-- | clang/test/Driver/cl-options.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 80ec5946158..d3de24b6605 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -815,7 +815,7 @@ def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Gr 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)">; diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index 4e99ff8467c..ec0bd572ba9 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/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 |

