forked from OSchip/llvm-project
[Driver] Accept -fno-lto in clang-cl
Some compiler-rt tests check for the presence of the compiler accepting -fno-lto to add that flag. Otherwise some tests don't link due to -flto mismatch between compiling and linking. $ cmake ... -DLLVM_ENABLE_LTO=Thin ... $ ninja projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-x86_64-Test.exe previously failed, now links. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D85252
This commit is contained in:
parent
83eaf5d55d
commit
8dc43852e4
|
@ -1351,7 +1351,7 @@ def flto_EQ : Joined<["-"], "flto=">, Flags<[CoreOption, CC1Option]>, Group<f_Gr
|
|||
HelpText<"Set LTO mode to either 'full' or 'thin'">, Values<"thin,full">;
|
||||
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>,
|
||||
def fno_lto : Flag<["-"], "fno-lto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
|
||||
HelpText<"Disable LTO mode (default)">;
|
||||
def flto_jobs_EQ : Joined<["-"], "flto-jobs=">,
|
||||
Flags<[CC1Option]>, Group<f_Group>,
|
||||
|
|
|
@ -586,6 +586,9 @@
|
|||
// RUN: %clang_cl -### /c -flto -- %s 2>&1 | FileCheck -check-prefix=LTO %s
|
||||
// LTO: -flto
|
||||
|
||||
// RUN: %clang_cl -### /c -flto -fno-lto -- %s 2>&1 | FileCheck -check-prefix=LTO-NO %s
|
||||
// LTO-NO-NOT: "-flto"
|
||||
|
||||
// RUN: %clang_cl -### /c -flto=thin -- %s 2>&1 | FileCheck -check-prefix=LTO-THIN %s
|
||||
// LTO-THIN: -flto=thin
|
||||
|
||||
|
|
Loading…
Reference in New Issue