Index: llvm/runtimes/CMakeLists.txt =================================================================== --- llvm/runtimes/CMakeLists.txt +++ llvm/runtimes/CMakeLists.txt @@ -64,7 +64,7 @@ list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/../cmake" "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules" - "${LLVM_LIBRARY_DIR}/cmake/llvm" + "${LLVM_BINARY_DIR}/cmake/modules/CMakeFiles" ) # Some of the runtimes will conditionally use the compiler-rt sanitizers @@ -90,7 +90,6 @@ set(LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_TOOLS_BINARY_DIR}) # This variable makes sure that e.g. llvm-lit is found. - set(LLVM_BINARY_DIR ${LLVM_BUILD_BINARY_DIR}) set(LLVM_LIBRARY_DIR ${LLVM_BUILD_LIBRARY_DIR}) set(LLVM_INCLUDE_DIR ${LLVM_BUILD_MAIN_INCLUDE_DIR}) set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR}) @@ -380,6 +379,7 @@ DEPENDS ${ARG_DEPENDS} ${CXX_HEADER_TARGET} # Builtins were built separately above CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off + -DLLVM_BINARY_DIR=${LLVM_BINARY_DIR} -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS} -DLLVM_DEFAULT_TARGET_TRIPLE=${TARGET_TRIPLE} -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON @@ -469,6 +469,7 @@ DEPENDS ${${name}_deps} ${CXX_HEADER_TARGET} # Builtins were built separately above CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off + -DLLVM_BINARY_DIR=${LLVM_BINARY_DIR} -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS} -DLLVM_DEFAULT_TARGET_TRIPLE=${target} -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON