llvm.org GIT mirror llvm / c574e67
[CMake] build correctly if build path contains whitespace The add_llvm_symbol_exports function in AddLLVM.cmake creates command line link flags with paths containing CMAKE_CURRENT_BINARY_DIR, but that will break if CMAKE_CURRENT_BINARY_DIR contains whitespace. This patch adds quotes to those paths. Fixes PR39843. Patch by John Garvin. Differential Revision: https://reviews.llvm.org/D55081 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347937 91177308-0d34-0410-b5e6-96231b3b80d8 Shoaib Meenai 10 months ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
7272 VERBATIM
7373 COMMENT "Creating export file for ${target_name}")
7474 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
75 LINK_FLAGS " -Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
75 LINK_FLAGS " -Wl,-exported_symbols_list,\"${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}\"")
7676 elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
7777 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
7878 LINK_FLAGS " -Wl,-bE:${export_file}")
9292 COMMENT "Creating export file for ${target_name}")
9393 if (${LLVM_LINKER_IS_SOLARISLD})
9494 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
95 LINK_FLAGS " -Wl,-M,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
95 LINK_FLAGS " -Wl,-M,\"${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}\"")
9696 else()
9797 set_property(TARGET ${target_name} APPEND_STRING PROPERTY
98 LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
98 LINK_FLAGS " -Wl,--version-script,\"${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}\"")
9999 endif()
100100 else()
101101 set(native_export_file "${target_name}.def")