[sanitizer] Pass the CMake compiler to custom libc++ build
This addresses the error introduced in r323054 on some bots.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@323061 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index 4fed305..4372673 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -482,6 +482,9 @@
if(NOT COMPILER_RT_STANDALONE_BUILD)
set(force_deps DEPENDS clang)
endif()
+ else()
+ set(compiler_args -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
endif()
if(CMAKE_SYSROOT)