Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add an explicit -object_path_lto flag during linking with a uniquifie…

…d temporary

file name if building Apple-style.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165185 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
commit 614800e2db52604bdfae59f22bb36fca01d609e6 1 parent 1446d16
Bill Wendling isanbard authored
Showing with 15 additions and 1 deletion.
  1. +8 −1 runtime/libprofile/Makefile
  2. +7 −0 tools/lto/Makefile
9 runtime/libprofile/Makefile
View
@@ -44,8 +44,15 @@ ifeq ($(HOST_OS),Darwin)
# 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
7 tools/lto/Makefile
View
@@ -49,4 +49,11 @@ ifeq ($(HOST_OS),Darwin)
-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
Please sign in to comment.
Something went wrong with that request. Please try again.