diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt @@ -548,7 +548,8 @@ # If we have a valid source tree, generate llvm-lit into the bin directory. # The user can still choose to have the check targets *use* a different lit # by specifying -DLLVM_EXTERNAL_LIT, but we generate it regardless. - if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/llvm-lit) + # Don't build llvm-lit for runtimes-build, it will clean up map_config. + if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/llvm-lit AND NOT RUNTIMES_BUILD) # Needed for lit support in standalone builds. include(AddLLVM) add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/llvm-lit ${CMAKE_CURRENT_BINARY_DIR}/llvm-lit)