[PATCH] D43751: [cmake] Append -Wl, -rpath-link conditionally to GNULD

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 8 07:12:07 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL327007: [cmake] Append -Wl,-rpath-link conditionally to GNULD (authored by mgorny, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D43751?vs=135854&id=137569#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D43751

Files:
  llvm/trunk/cmake/modules/AddLLVM.cmake


Index: llvm/trunk/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake
+++ llvm/trunk/cmake/modules/AddLLVM.cmake
@@ -1589,7 +1589,8 @@
     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
       set_property(TARGET ${name} APPEND_STRING PROPERTY
                    LINK_FLAGS " -Wl,-z,origin ")
-    elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT LLVM_LINKER_IS_GOLD)
+    endif()
+    if(LLVM_LINKER_IS_GNULD)
       # $ORIGIN is not interpreted at link time by ld.bfd
       set_property(TARGET ${name} APPEND_STRING PROPERTY
                    LINK_FLAGS " -Wl,-rpath-link,${LLVM_LIBRARY_OUTPUT_INTDIR} ")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43751.137569.patch
Type: text/x-patch
Size: 711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180308/eb18d955/attachment.bin>


More information about the llvm-commits mailing list