From 10181ae49c25e22267ea3d539dd53e07d5e45528 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 3 Oct 2012 23:52:10 +0000 Subject: Add an explicit -object_path_lto flag during linking with a uniquified temporary file name if building Apple-style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165185 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lto/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/lto/Makefile') diff --git a/tools/lto/Makefile b/tools/lto/Makefile index 153fa03137..3e7621f6db 100644 --- a/tools/lto/Makefile +++ b/tools/lto/Makefile @@ -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 -- cgit v1.2.3