[llvm] r329778 - [CMake][runtimes] Process common options in runtimes build

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 22:18:03 PDT 2018


Author: phosek
Date: Tue Apr 10 22:18:03 2018
New Revision: 329778

URL: http://llvm.org/viewvc/llvm-project?rev=329778&view=rev
Log:
[CMake][runtimes] Process common options in runtimes build

This was removed in D39932 but turned out this is actually needed
because runtimes such as compiler-rt and libc++ rely on common options
processing for setting certain flags such as -ffunction-sections and
-fdata-sections.

Differential Revision: https://reviews.llvm.org/D45507

Modified:
    llvm/trunk/runtimes/CMakeLists.txt

Modified: llvm/trunk/runtimes/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtimes/CMakeLists.txt?rev=329778&r1=329777&r2=329778&view=diff
==============================================================================
--- llvm/trunk/runtimes/CMakeLists.txt (original)
+++ llvm/trunk/runtimes/CMakeLists.txt Tue Apr 10 22:18:03 2018
@@ -107,6 +107,13 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_
     endif()
   endif()
 
+  # Avoid checking whether the compiler is working.
+  set(LLVM_COMPILER_CHECKED ON)
+
+  # Handle common options used by all runtimes.
+  include(AddLLVM)
+  include(HandleLLVMOptions)
+
   set(CMAKE_REQUIRED_FLAGS ${SAFE_CMAKE_REQUIRED_FLAGS})
   set(CMAKE_REQUIRED_LIBRARIES ${SAFE_CMAKE_REQUIRED_LIBRARIES})
 




More information about the llvm-commits mailing list