Skip to content

Commit

Permalink
Add an explicit -object_path_lto flag during linking with a uniquifie…
Browse files Browse the repository at this point in the history
…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
isanbard committed Oct 3, 2012
1 parent 471b917 commit 10181ae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion runtime/libprofile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 7 additions & 0 deletions tools/lto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 10181ae

Please sign in to comment.