aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2010-11-29 00:20:21 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2010-11-29 00:20:21 +0000
commit38d439fb13ae465d53767c1c912abf40e64d6ee4 (patch)
treee670f7974b025ca1e55273fe7147d7a51297f3e9 /test
parentb3ccc12831cedb8785611192f47377a947df8dce (diff)
test: Use $SharedLibDir for loadable modules. On Cygming, loadable modules are not in lib/ but bin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--test/Makefile2
-rw-r--r--test/Unit/lit.cfg5
-rw-r--r--test/Unit/lit.site.cfg.in1
-rw-r--r--test/lit.cfg1
-rw-r--r--test/site.exp.in1
6 files changed, 9 insertions, 3 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0d622fa536..fb8a770767 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -7,6 +7,8 @@ set(TARGETS_TO_BUILD ${TARGETS_BUILT})
set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR}")
set(SHLIBEXT "${LTDL_SHLIB_EXT}")
+set(SHLIBDIR "${LLVM_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR}")
+
if(BUILD_SHARED_LIBS)
set(LLVM_SHARED_LIBS_ENABLED "1")
else()
diff --git a/test/Makefile b/test/Makefile
index 6312a3f606..4218fadf1d 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -143,6 +143,7 @@ site.exp: FORCE
@echo 'set llvmgcc_langs "$(LLVMGCC_LANGS)"' >> site.tmp
@echo 'set llvmtoolsdir "$(ToolDir)"' >>site.tmp
@echo 'set llvmlibsdir "$(LibDir)"' >>site.tmp
+ @echo 'set llvmshlibdir "$(SharedLibDir)"' >>site.tmp
@echo 'set llvm_bindings "$(BINDINGS_TO_BUILD)"' >> site.tmp
@echo 'set srcroot "$(LLVM_SRC_ROOT)"' >>site.tmp
@echo 'set objroot "$(LLVM_OBJ_ROOT)"' >>site.tmp
@@ -187,6 +188,7 @@ Unit/lit.site.cfg: $(PROJ_OBJ_DIR)/Unit/.dir FORCE
-e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \
-e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \
-e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \
+ -e "s#@SHLIBDIR@#$(SharedLibDir)#g" \
-e "s#@SHLIBPATH_VAR@#$(SHLIBPATH_VAR)#g" \
$(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg
index 5fe07324a1..a41f0937f9 100644
--- a/test/Unit/lit.cfg
+++ b/test/Unit/lit.cfg
@@ -25,11 +25,10 @@ config.test_format = lit.formats.GoogleTest(llvm_build_mode, 'Tests')
# If necessary, point the dynamic loader at libLLVM.so.
if config.enable_shared:
- libdir = os.path.join(config.llvm_obj_root, config.llvm_build_mode, 'lib')
shlibpath = config.environment.get(config.shlibpath_var,'')
if shlibpath:
- shlibpath = ':' + shlibpath
- shlibpath = libdir + shlibpath
+ shlibpath = os.pathsep + shlibpath
+ shlibpath = config.shlibdir + shlibpath
config.environment[config.shlibpath_var] = shlibpath
# Check that the object root is known.
diff --git a/test/Unit/lit.site.cfg.in b/test/Unit/lit.site.cfg.in
index 75932a4897..9643507b16 100644
--- a/test/Unit/lit.site.cfg.in
+++ b/test/Unit/lit.site.cfg.in
@@ -6,6 +6,7 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvmgcc_dir = "@LLVMGCCDIR@"
config.llvm_build_mode = "@LLVM_BUILD_MODE@"
config.enable_shared = @ENABLE_SHARED@
+config.shlibdir = "@SHLIBDIR@"
config.shlibpath_var = "@SHLIBPATH_VAR@"
# Support substitution of the tools_dir and build_mode with user parameters.
diff --git a/test/lit.cfg b/test/lit.cfg
index aa1e1a979a..63b00325f3 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -128,6 +128,7 @@ for line in open(os.path.join(config.llvm_obj_root, 'test', 'site.exp')):
config.substitutions.append(('%llvmgcc_only', site_exp['llvmgcc']))
for sub in ['llvmgcc', 'llvmgxx', 'emitir', 'compile_cxx', 'compile_c',
'link', 'shlibext', 'ocamlopt', 'llvmdsymutil', 'llvmlibsdir',
+ 'llvmshlibdir',
'bugpoint_topts']:
if sub in ('llvmgcc', 'llvmgxx'):
config.substitutions.append(('%' + sub,
diff --git a/test/site.exp.in b/test/site.exp.in
index 0573def8ef..277d54995f 100644
--- a/test/site.exp.in
+++ b/test/site.exp.in
@@ -5,6 +5,7 @@ set TARGETS_TO_BUILD "@TARGETS_TO_BUILD@"
set llvmgcc_langs "@LLVMGCC_LANGS@"
set llvmtoolsdir "@LLVM_TOOLS_DIR@"
set llvmlibsdir "@LLVM_LIBS_DIR@"
+set llvmshlibdir "@SHLIBDIR@"
set llvm_bindings "@LLVM_BINDINGS@"
set srcroot "@LLVM_SOURCE_DIR@"
set objroot "@LLVM_BINARY_DIR@"