aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gold/CMakeLists.txt
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-03-11 18:27:13 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-03-11 18:27:13 +0000
commit4839ded3bdf83a47c581b818e295669533cc9a9b (patch)
tree9bb42b8c1f4b79ecfff1c4fecf989896748a986f /tools/gold/CMakeLists.txt
parentaa1fbb40ad432479972971cc877cb4109bd59649 (diff)
downloadexternal_llvm-4839ded3bdf83a47c581b818e295669533cc9a9b.zip
external_llvm-4839ded3bdf83a47c581b818e295669533cc9a9b.tar.gz
external_llvm-4839ded3bdf83a47c581b818e295669533cc9a9b.tar.bz2
Force re-linking of LLVMgold.so when its exports file changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gold/CMakeLists.txt')
-rw-r--r--tools/gold/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/gold/CMakeLists.txt b/tools/gold/CMakeLists.txt
index 15ca8d7..d8633e6 100644
--- a/tools/gold/CMakeLists.txt
+++ b/tools/gold/CMakeLists.txt
@@ -32,6 +32,12 @@ else()
set_property(DIRECTORY APPEND
PROPERTY ADDITIONAL_MAKE_CLEAN_FILES exportsfile)
+ # Force re-linking when the exports file changes. Actually, it
+ # forces recompilation of gold-plugin.cpp. The LINK_DEPENDS target
+ # property only works for makefile-based generators.
+ set_property(SOURCE gold-plugin.cpp APPEND PROPERTY
+ OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/exportsfile)
+
target_link_libraries(LLVMgold LTO -Wl,--version-script,exportsfile)
add_dependencies(LLVMgold gold_exports)
endif()