diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-12-29 23:04:48 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-12-29 23:04:48 +0000 |
commit | 098bcf76bc35e3fc3c219f169f569d775f83cb23 (patch) | |
tree | cdfed3785360b311879e684a8204ba70ef1d8d29 /cmake/modules/AddLLVM.cmake | |
parent | ee6d3cd701f49918b5c789a354efc4e29b09ac0b (diff) | |
download | llvm-098bcf76bc35e3fc3c219f169f569d775f83cb23.tar.gz llvm-098bcf76bc35e3fc3c219f169f569d775f83cb23.tar.bz2 llvm-098bcf76bc35e3fc3c219f169f569d775f83cb23.tar.xz |
[cmake] In add_llvm_loadable_module, don't clobber existing LINK_FLAGS on OS X.
Also add leading spaces to the LINK_FLAGS setters, since that's what the cmake
folks recommend: http://www.cmake.org/pipermail/cmake/2012-October/052399.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules/AddLLVM.cmake')
-rw-r--r-- | cmake/modules/AddLLVM.cmake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 9bcf00ed0d..3d0c53d1eb 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -26,7 +26,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,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}") + LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}") else() set(native_export_file "${target_name}.def") @@ -46,10 +46,10 @@ function(add_llvm_symbol_exports target_name export_file) COMMENT "Creating export file for ${target_name}") if(CYGWIN OR MINGW) set_property(TARGET ${target_name} APPEND_STRING PROPERTY - LINK_FLAGS "${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}") + LINK_FLAGS " ${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}") else() set_property(TARGET ${target_name} APPEND_STRING PROPERTY - LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}") + LINK_FLAGS " /DEF:${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}") endif() endif() @@ -147,8 +147,8 @@ ${name} ignored.") if (APPLE) # Darwin-specific linker flags for loadable modules. - set_target_properties(${name} PROPERTIES - LINK_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress") + set_property(TARGET ${name} APPEND_STRING PROPERTY + LINK_FLAGS " -Wl,-flat_namespace -Wl,-undefined -Wl,suppress") endif() if( EXCLUDE_FROM_ALL ) |