[PATCH] D45507: [CMake][runtimes] Process common options in runtimes build

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 16:44:51 PDT 2018


phosek created this revision.
phosek added reviewers: cryptoad, beanz.
Herald added subscribers: llvm-commits, mgorny.

This was removed in https://reviews.llvm.org/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.


Repository:
  rL LLVM

https://reviews.llvm.org/D45507

Files:
  llvm/runtimes/CMakeLists.txt


Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -107,6 +107,13 @@
     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})
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45507.141931.patch
Type: text/x-patch
Size: 532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180410/5dd00357/attachment.bin>


More information about the llvm-commits mailing list