diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake --- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake +++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake @@ -248,8 +248,10 @@ string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" CONFIG_OUTPUT ${CONFIG_OUTPUT}) list(GET CONFIG_OUTPUT 0 LDFLAGS) list(GET CONFIG_OUTPUT 1 LIBLIST) - set(LLVM_XRAY_LDFLAGS ${LDFLAGS} CACHE STRING "Linker flags for LLVMXRay library") - set(LLVM_XRAY_LIBLIST ${LIBLIST} CACHE STRING "Library list for LLVMXRay") + string(REPLACE "\\" "/" LDFLAGS ${LDFLAGS}) + string(REPLACE "\\" "/" LIBLIST ${LIBLIST}) + set(LLVM_XRAY_LDFLAGS ${LDFLAGS} CACHE STRING "Linker flags for LLVMXRay library" FORCE) + set(LLVM_XRAY_LIBLIST ${LIBLIST} CACHE STRING "Library list for LLVMXRay" FORCE) set(COMPILER_RT_HAS_LLVMXRAY TRUE) endif() @@ -268,8 +270,10 @@ if (LIBLIST STREQUAL "") message(WARNING "testingsupport library not installed, some tests will be skipped") else() - set(LLVM_TESTINGSUPPORT_LDFLAGS ${LDFLAGS} CACHE STRING "Linker flags for LLVMTestingSupport library") - set(LLVM_TESTINGSUPPORT_LIBLIST ${LIBLIST} CACHE STRING "Library list for LLVMTestingSupport") + string(REPLACE "\\" "/" LDFLAGS ${LDFLAGS}) + string(REPLACE "\\" "/" LDFLAGS ${LIBLIST}) + set(LLVM_TESTINGSUPPORT_LDFLAGS ${LDFLAGS} CACHE STRING "Linker flags for LLVMTestingSupport library" FORCE) + set(LLVM_TESTINGSUPPORT_LIBLIST ${LIBLIST} CACHE STRING "Library list for LLVMTestingSupport" FORCE) set(COMPILER_RT_HAS_LLVMTESTINGSUPPORT TRUE) endif() endif()