[llvm-commits] [llvm] r165282 - /llvm/trunk/Makefile.rules
Bill Wendling
isanbard at gmail.com
Thu Oct 4 17:22:46 PDT 2012
Author: void
Date: Thu Oct 4 19:22:46 2012
New Revision: 165282
URL: http://llvm.org/viewvc/llvm-project?rev=165282&view=rev
Log:
Use -object_path_lto when linking executables if building Apple style.
Modified:
llvm/trunk/Makefile.rules
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=165282&r1=165281&r2=165282&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Thu Oct 4 19:22:46 2012
@@ -631,19 +631,23 @@
# Adjust linker flags for building an executable
ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
-ifneq ($(HOST_OS), Darwin)
-ifdef TOOLNAME
- LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
- ifdef EXAMPLE_TOOL
- LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag)
- else
- LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag)
+ ifneq ($(HOST_OS), Darwin)
+ ifdef TOOLNAME
+ LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
+ ifdef EXAMPLE_TOOL
+ LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag)
+ else
+ LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag)
+ endif
endif
-endif
else
-ifneq ($(DARWIN_MAJVERS),4)
- LD.Flags += $(RPATH) -Wl, at executable_path/../lib
-endif
+ ifneq ($(DARWIN_MAJVERS),4)
+ LD.Flags += $(RPATH) -Wl, at executable_path/../lib
+ endif
+ ifeq ($(RC_BUILDIT),YES)
+ TempFile := $(shell mktemp ${OBJROOT}/llvm-lto.XXXXXX)
+ LD.Flags += -Wl,-object_path_lto -Wl,$(TempFile)
+ endif
endif
endif
More information about the llvm-commits
mailing list