diff options
author | Hans Wennborg <hans@hanshq.net> | 2019-08-20 07:41:14 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2019-08-20 07:41:14 +0000 |
commit | 9e8b011195a3602dff7193f71527697b121fb551 (patch) | |
tree | dd20ff8898882017e71bb88254912b9e32cd493f | |
parent | f182617352261d12ed990fdf833b8ce69a0642da (diff) | |
download | bcm5719-llvm-9e8b011195a3602dff7193f71527697b121fb551.tar.gz bcm5719-llvm-9e8b011195a3602dff7193f71527697b121fb551.zip |
[compiler-rt][crt] Pass -fno-lto in check_cxx_section_exists
Otherwise it doesn't work when building with -DLLVM_ENABLE_LTO=thin
(We hit this in Chromium in
https://bugs.chromium.org/p/chromium/issues/detail?id=966403)
llvm-svn: 369336
-rw-r--r-- | compiler-rt/lib/crt/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler-rt/lib/crt/CMakeLists.txt b/compiler-rt/lib/crt/CMakeLists.txt index 03a07f475d7..34c368f7ca4 100644 --- a/compiler-rt/lib/crt/CMakeLists.txt +++ b/compiler-rt/lib/crt/CMakeLists.txt @@ -19,6 +19,7 @@ function(check_cxx_section_exists section output) if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET) list(APPEND try_compile_flags "-target ${CMAKE_C_COMPILER_TARGET}") endif() + append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto try_compile_flags) string(REPLACE ";" " " extra_flags "${try_compile_flags}") |