[llvm-commits] [llvm] r165185 - in /llvm/trunk: runtime/libprofile/Makefile tools/lto/Makefile

Bill Wendling isanbard at gmail.com
Wed Oct 3 16:52:10 PDT 2012


Author: void
Date: Wed Oct  3 18:52:10 2012
New Revision: 165185

URL: http://llvm.org/viewvc/llvm-project?rev=165185&view=rev
Log:
Add an explicit -object_path_lto flag during linking with a uniquified temporary
file name if building Apple-style.

Modified:
    llvm/trunk/runtime/libprofile/Makefile
    llvm/trunk/tools/lto/Makefile

Modified: llvm/trunk/runtime/libprofile/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/libprofile/Makefile?rev=165185&r1=165184&r2=165185&view=diff
==============================================================================
--- llvm/trunk/runtime/libprofile/Makefile (original)
+++ llvm/trunk/runtime/libprofile/Makefile Wed Oct  3 18:52:10 2012
@@ -44,8 +44,15 @@
     # command line.
     DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
     ifneq ($(DARWIN_VERS),8)
-       LLVMLibsOptions    := $(LLVMLibsOptions)  \
+       LLVMLibsOptions    := $(LLVMLibsOptions) \
                             -Wl,-install_name \
                             -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
     endif
+
+    # If we're doing an Apple-style build, add the LTO object path.
+    ifeq ($(RC_BUILDIT),YES)
+       TempFile            = $(shell mktemp ${OBJROOT}/profile_rt-lto.XXXXXX)
+       LLVMLibsOptions    := $(LLVMLibsOptions) \
+                             -Wl,-object_path_lto -Wl,$(TempFile)
+    endif
 endif

Modified: llvm/trunk/tools/lto/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/Makefile?rev=165185&r1=165184&r2=165185&view=diff
==============================================================================
--- llvm/trunk/tools/lto/Makefile (original)
+++ llvm/trunk/tools/lto/Makefile Wed Oct  3 18:52:10 2012
@@ -49,4 +49,11 @@
                             -Wl,-install_name \
                             -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
     endif
+
+    # If we're doing an Apple-style build, add the LTO object path.
+    ifeq ($(RC_BUILDIT),YES)
+       TempFile            = $(shell mktemp ${OBJROOT}/llvm-lto.XXXXXX)
+       LLVMLibsOptions    := $(LLVMLibsOptions) \
+                             -Wl,-object_path_lto -Wl,$(TempFile)
+    endif
 endif





More information about the llvm-commits mailing list