[PATCH] D62315: [compiler-rt][crt] Pass -fno-lto in check_cxx_section_exists

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 07:19:06 PDT 2019


hans created this revision.
hans added reviewers: phosek, thakis.
Herald added subscribers: dexonsmith, inglorion, mehdi_amini, mgorny, dberris.
Herald added a project: LLVM.

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)


https://reviews.llvm.org/D62315

Files:
  compiler-rt/lib/crt/CMakeLists.txt


Index: compiler-rt/lib/crt/CMakeLists.txt
===================================================================
--- compiler-rt/lib/crt/CMakeLists.txt
+++ compiler-rt/lib/crt/CMakeLists.txt
@@ -19,6 +19,7 @@
   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}")
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62315.200968.patch
Type: text/x-patch
Size: 500 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190523/749df1f3/attachment.bin>


More information about the llvm-commits mailing list