diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-02-23 18:10:07 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-02-23 18:10:07 +0000 |
commit | ea6c39d417172a8edb99667e93cd6b67cd024e6a (patch) | |
tree | 3c6c8f110eb785834997bfe59326bc8022f68dfd /unittests | |
parent | e3d97c744772c075e11f372548cc8d848d555ee9 (diff) | |
download | external_llvm-ea6c39d417172a8edb99667e93cd6b67cd024e6a.zip external_llvm-ea6c39d417172a8edb99667e93cd6b67cd024e6a.tar.gz external_llvm-ea6c39d417172a8edb99667e93cd6b67cd024e6a.tar.bz2 |
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 'unittests')
-rw-r--r-- | unittests/Makefile.unittest | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/unittests/Makefile.unittest b/unittests/Makefile.unittest index 6fbef54..9dfb965 100644 --- a/unittests/Makefile.unittest +++ b/unittests/Makefile.unittest @@ -28,6 +28,17 @@ CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include/ CPP.Flags += $(NO_VARIADIC_MACROS) TESTLIBS = -lGoogleTest -lUnitTestMain +ifeq ($(ENABLE_SHARED), 1) + # Add the absolute path to the dynamic library. This is ok because + # we'll never install unittests. + LD.Flags += $(RPATH) -Wl,$(LibDir) +endif +ifeq ($(ENABLE_SHARED), 1) + # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most + # of the time. + Run.Shared := $(SHLIBPATH_VAR)="$(LibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)" +endif + $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(Echo) Linking $(BuildMode) unit test $(TESTNAME) $(StripWarnMsg) $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \ @@ -38,6 +49,6 @@ $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) all:: $(LLVMUnitTestExe) unitcheck:: $(LLVMUnitTestExe) - $(LLVMUnitTestExe) + $(Run.Shared) $(LLVMUnitTestExe) endif |