[llvm-commits] [llvm] r127473 - /llvm/trunk/tools/gold/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Fri Mar 11 10:27:13 PST 2011
Author: ofv
Date: Fri Mar 11 12:27:13 2011
New Revision: 127473
URL: http://llvm.org/viewvc/llvm-project?rev=127473&view=rev
Log:
Force re-linking of LLVMgold.so when its exports file changes.
Modified:
llvm/trunk/tools/gold/CMakeLists.txt
Modified: llvm/trunk/tools/gold/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/CMakeLists.txt?rev=127473&r1=127472&r2=127473&view=diff
==============================================================================
--- llvm/trunk/tools/gold/CMakeLists.txt (original)
+++ llvm/trunk/tools/gold/CMakeLists.txt Fri Mar 11 12:27:13 2011
@@ -32,6 +32,12 @@
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()
More information about the llvm-commits
mailing list