Use a special path to place the .o files in.
[oota-llvm.git] / tools / lto / Makefile
index 153fa031378dc3c965652d9028d7606359c8b69d..4a468dedf59f91fe23aebe75d2fe2120415885de 100644 (file)
@@ -49,4 +49,12 @@ 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)
+       ObjDir             := $(shell mkdir -p ${OBJROOT}/dSYMs)
+       TempFile           := $(shell mktemp ${ObjDir}/llvm-lto.XXXXXX)
+       LLVMLibsOptions    := $(LLVMLibsOptions) \
+                             -Wl,-object_path_lto -Wl,$(TempFile)
+    endif
 endif