[compiler-rt] r225049 - Avoid building compiler-rt with LTO.

Rafael Espindola rafael.espindola at gmail.com
Wed Dec 31 10:20:52 PST 2014


Author: rafael
Date: Wed Dec 31 12:20:52 2014
New Revision: 225049

URL: http://llvm.org/viewvc/llvm-project?rev=225049&view=rev
Log:
Avoid building compiler-rt with LTO.

During a LTO we still need to build a compiler_rt with regular object files
in the .a.

Modified:
    compiler-rt/trunk/CMakeLists.txt
    compiler-rt/trunk/cmake/config-ix.cmake

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=225049&r1=225048&r2=225049&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Wed Dec 31 12:20:52 2014
@@ -231,6 +231,7 @@ append_list_if(COMPILER_RT_HAS_FUNWIND_T
 append_list_if(COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG -fno-stack-protector SANITIZER_COMMON_CFLAGS)
 append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SANITIZER_COMMON_CFLAGS)
 append_list_if(COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG -fno-function-sections SANITIZER_COMMON_CFLAGS)
+append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto SANITIZER_COMMON_CFLAGS)
 
 if(MSVC)
   # Replace the /MD[d] flags with /MT.

Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=225049&r1=225048&r2=225049&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Wed Dec 31 12:20:52 2014
@@ -16,6 +16,7 @@ check_cxx_compiler_flag(-ffreestanding
 check_cxx_compiler_flag("-Werror -fno-function-sections" COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG)
 check_cxx_compiler_flag(-std=c++11           COMPILER_RT_HAS_STD_CXX11_FLAG)
 check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC)
+check_cxx_compiler_flag(-fno-lto             COMPILER_RT_HAS_FNO_LTO_FLAG)
 
 check_cxx_compiler_flag(/GR COMPILER_RT_HAS_GR_FLAG)
 check_cxx_compiler_flag(/GS COMPILER_RT_HAS_GS_FLAG)





More information about the llvm-commits mailing list