[CMake][compiler-rt] Don't load LLVM config in the runtimes build

LLVM runtimes build already loads the LLVM config and sets all
appropriate variables, no need to do it again.

Differential Revision: https://reviews.llvm.org/D137870
This commit is contained in:
Petr Hosek 2022-11-11 22:50:14 +00:00
parent 1ebfe9b264
commit 9c2700dfa5
3 changed files with 7 additions and 2 deletions

View File

@ -79,7 +79,9 @@ if (COMPILER_RT_STANDALONE_BUILD)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
load_llvm_config()
if (NOT LLVM_RUNTIMES_BUILD)
load_llvm_config()
endif()
if (TARGET intrinsics_gen)
# Loading the llvm config causes this target to be imported so place it
# under the appropriate folder in an IDE.

View File

@ -25,7 +25,9 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
include(base-config-ix)
include(CompilerRTUtils)
load_llvm_config()
if (NOT LLVM_RUNTIMES_BUILD)
load_llvm_config()
endif()
construct_compiler_rt_default_triple()
include(SetPlatformToolchainTools)

View File

@ -54,6 +54,7 @@ if (NOT LLVM_BINARY_DIR)
endif()
if (NOT LLVM_FOUND)
set(LLVM_TOOLS_BINARY_DIR ${LLVM_BINARY_DIR}/bin)
set(LLVM_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include)
set(LLVM_LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/lib)
endif()