diff --git a/Makefile.rules b/Makefile.rules index a67aef7c97a..2b17cc04fa0 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -1387,7 +1387,7 @@ endif ifeq ($(HOST_OS),Darwin) ifdef TOOL_INFO_PLIST -LD.Flags += -Wl,-sectcreate,__TEXT,__info_plist,$(ObjDir)/$(TOOL_INFO_PLIST) +LD.Flags += -Wl,-sectcreate,__TEXT,__info_plist,"$(ObjDir)/$(TOOL_INFO_PLIST)" $(ToolBuildPath): $(ObjDir)/$(TOOL_INFO_PLIST) diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index cee383353ad..bdef746d414 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -68,7 +68,7 @@ function(add_llvm_symbol_exports target_name export_file) VERBATIM COMMENT "Creating export file for ${target_name}") set_property(TARGET ${target_name} APPEND_STRING PROPERTY - LINK_FLAGS " -Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}") + LINK_FLAGS " -Wl,-exported_symbols_list,\"${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}\"") elseif(LLVM_HAVE_LINK_VERSION_SCRIPT) # Gold and BFD ld require a version script rather than a plain list. set(native_export_file "${target_name}.exports")