diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index ea73cec050e..d56f7af583e 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -222,6 +222,8 @@ else() # if this is included from LLVM's CMake if (LLVM_EXTERNAL_LIBCXX_SOURCE_DIR AND "libcxx" IN_LIST LLVM_ENABLE_RUNTIMES) # This looks wrong, but libcxx's build actually wants the header dir to be # the root build dir, not the include directory. + set(LIBCXX_BINARY_DIR ${LLVM_BINARY_DIR}) + set(LIBCXX_SOURCE_DIR ${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR}) set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR}) set(CXX_HEADER_TARGET runtime-libcxx-headers) add_subdirectory(${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR}/include ${CXX_HEADER_TARGET})