diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 4c4a1120651b..578a3169178e 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -1102,7 +1102,7 @@ if (CLANG_CL AND (LLVM_BUILD_INSTRUMENTED OR LLVM_USE_SANITIZER)) endif() file(TO_CMAKE_PATH "${clang_compiler_rt_file}" clang_compiler_rt_file) get_filename_component(clang_runtime_dir "${clang_compiler_rt_file}" DIRECTORY) - append("/libpath:${clang_runtime_dir}" + append("/libpath:\"${clang_runtime_dir}\"" CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)