diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-02-25 06:34:33 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-02-25 06:34:33 +0000 |
commit | c90171961d020d93e4ce548016d8ccb8aab00c57 (patch) | |
tree | 639ac8f1a8273a2563895bed7d55bd60fbff5f46 /Makefile.rules | |
parent | e6ba0b576231ad3af599d1985dad370e59d954f9 (diff) | |
download | external_llvm-c90171961d020d93e4ce548016d8ccb8aab00c57.zip external_llvm-c90171961d020d93e4ce548016d8ccb8aab00c57.tar.gz external_llvm-c90171961d020d93e4ce548016d8ccb8aab00c57.tar.bz2 |
Try r96559 for the third time. This time the shared library is only built if
--enable-shared is passed to configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Makefile.rules b/Makefile.rules index db52985..b5b3525 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: |