Add an explicit -object_path_lto flag during linking with a uniquified temporary
authorBill Wendling <isanbard@gmail.com>
Wed, 3 Oct 2012 23:49:57 +0000 (23:49 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 3 Oct 2012 23:49:57 +0000 (23:49 +0000)
file name if building Apple-style.

llvm-svn: 165184

clang/tools/libclang/Makefile

index cefd9ba..5fdfd0e 100644 (file)
@@ -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