From 9b4035a85a9bb045a2ef4cda275b8545093a58fd Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 11 Apr 2018 05:18:03 +0000 Subject: [PATCH] [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 llvm-svn: 329778 --- llvm/runtimes/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index c020b851bb97..06581b3c8f66 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -107,6 +107,13 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) 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})