From 731a26202db4251ce9f98e64bed8ee257c46eb61 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 3 Oct 2012 23:49:57 +0000 Subject: [PATCH] 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/cfe/trunk@165184 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/libclang/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/libclang/Makefile b/tools/libclang/Makefile index cefd9ba6df..5fdfd0ebb5 100644 --- a/tools/libclang/Makefile +++ b/tools/libclang/Makefile @@ -52,4 +52,10 @@ ifeq ($(HOST_OS),Darwin) LLVMLibsOptions += -Wl,-install_name \ -Wl,"@rpath/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}/clang-lto.XXXXXX) + LLVMLibsOptions += -Wl,-object_path_lto -Wl,$(TempFile) + endif endif -- 2.50.1