[llvm] r254657 - [CMake] set_target_properties doesn't append link flags
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 14:51:09 PST 2015
Author: cbieneman
Date: Thu Dec 3 16:51:08 2015
New Revision: 254657
URL: http://llvm.org/viewvc/llvm-project?rev=254657&view=rev
Log:
[CMake] set_target_properties doesn't append link flags
This fixes a bug introduced in r254627, and another occurance of the same bug in this file.
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=254657&r1=254656&r2=254657&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Thu Dec 3 16:51:08 2015
@@ -667,7 +667,7 @@ function(export_executable_symbols targe
if (NOT MSVC) # MSVC's linker doesn't support exporting all symbols.
set_target_properties(${target} PROPERTIES ENABLE_EXPORTS 1)
if (APPLE)
- set_target_properties(${target} PROPERTIES
+ set_property(TARGET ${target} APPEND_STRING PROPERTY
LINK_FLAGS "-rdynamic")
endif()
endif()
@@ -1185,8 +1185,8 @@ function(llvm_externalize_debuginfo name
OR CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE} MATCHES "-flto")
set(lto_object ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${name}-lto.o)
- set_target_properties(${name} PROPERTIES
- LINK_FLAGS "-Wl,-object_path_lto -Wl,${lto_object}")
+ set_property(TARGET ${name} APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,-object_path_lto,${lto_object}")
endif()
add_custom_command(TARGET ${name} POST_BUILD
COMMAND xcrun dsymutil $<TARGET_FILE:${name}>
More information about the llvm-commits
mailing list