[runtimes] Pass-through CLANG_RESOURCE_DIR to cmake invocations (#73185)

compiler-rt and libomp need access to this variable in order to install
their libraries and headers to the path that clang expects.
This commit is contained in:
Tom Stellard 2023-11-28 21:32:10 -08:00 committed by GitHub
parent f35c0f2f23
commit 2e838c8437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@
# similar although simpler functionality. We should figure out how to merge
# the two files.
set(COMMON_CMAKE_ARGS "-DHAVE_LLVM_LIT=ON")
set(COMMON_CMAKE_ARGS "-DHAVE_LLVM_LIT=ON;-DCLANG_RESOURCE_DIR=${CLANG_RESOURCE_DIR}")
foreach(proj ${LLVM_ENABLE_RUNTIMES})
set(proj_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../${proj}")
if(IS_DIRECTORY ${proj_dir} AND EXISTS ${proj_dir}/CMakeLists.txt)