summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2010-02-23 18:10:07 +0000
committerJeffrey Yasskin <jyasskin@google.com>2010-02-23 18:10:07 +0000
commitea6c39d417172a8edb99667e93cd6b67cd024e6a (patch)
tree3c6c8f110eb785834997bfe59326bc8022f68dfd /Makefile.rules
parente3d97c744772c075e11f372548cc8d848d555ee9 (diff)
downloadllvm-ea6c39d417172a8edb99667e93cd6b67cd024e6a.tar.gz
llvm-ea6c39d417172a8edb99667e93cd6b67cd024e6a.tar.bz2
llvm-ea6c39d417172a8edb99667e93cd6b67cd024e6a.tar.xz
Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 of
the examples shared to make sure the shared library keeps working. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules18
1 files changed, 13 insertions, 5 deletions
diff --git a/Makefile.rules b/Makefile.rules
index db52985179..b5b35256b7 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -623,11 +623,12 @@ endif
ifneq ($(HOST_OS),Darwin)
ifneq ($(DARWIN_MAJVERS),4)
ifdef TOOLNAME
-ifdef EXAMPLE_TOOL
- LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(RDYNAMIC)
-else
- LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC)
-endif
+ LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
+ ifdef EXAMPLE_TOOL
+ LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(RDYNAMIC)
+ else
+ LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC)
+ endif
endif
endif
endif
@@ -960,11 +961,16 @@ $(LLVM_CONFIG):
$(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG)
+ifeq ($(ENABLE_SHARED), 1)
+LLVMLibsOptions += -lLLVM-$(LLVMVersion)
+LLVMLibsPaths += $(LibDir)/libLLVM-$(LLVMVersion)$(SHLIBEXT)
+else
LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS))
LLVMLibsPaths += $(LLVM_CONFIG) \
$(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS))
endif
endif
+endif
###############################################################################
# Library Build Rules: Four ways to build a library
@@ -1169,11 +1175,13 @@ endif
# If neither BUILD_ARCHIVE or LOADABLE_MODULE are specified, default to
# building an archive.
#---------------------------------------------------------
+ifndef NO_BUILD_ARCHIVE
ifndef BUILD_ARCHIVE
ifndef LOADABLE_MODULE
BUILD_ARCHIVE = 1
endif
endif
+endif
#---------------------------------------------------------
# Archive Library Targets: