diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-26 07:36:09 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-26 07:36:09 +0000 |
commit | 9e10cc7a4c1e5b620bf4d5c90d4e452b3ae04c81 (patch) | |
tree | 9e1b7cfb2f15b31fea32b5318b32eba285c74ac8 /test | |
parent | c22dd4d7318720db5c3c34aebe4aac0b5af6cc94 (diff) | |
download | clang-9e10cc7a4c1e5b620bf4d5c90d4e452b3ae04c81.tar.gz |
Add the lib path to LD_LIBRARY_PATH, so finding .so works (more) portably.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 4 | ||||
-rw-r--r-- | test/Makefile | 1 | ||||
-rw-r--r-- | test/lit.cfg | 7 | ||||
-rw-r--r-- | test/lit.site.cfg.in | 1 |
4 files changed, 13 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1ecdc53b75..2a7f132fb5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -25,6 +25,7 @@ set(CLANG_TEST_DIRECTORIES include(FindPythonInterp) if(PYTHONINTERP_FOUND) get_target_property(LLVM_TOOLS_PATH clang RUNTIME_OUTPUT_DIRECTORY) + get_target_property(LLVM_LIBS_PATH clang LIBRARY_OUTPUT_DIRECTORY) set(CLANG_TEST_EXTRA_ARGS) if (MSVC OR XCODE) set(CLANG_TEST_EXTRA_ARGS "--no-progress-bar") @@ -35,6 +36,7 @@ if(PYTHONINTERP_FOUND) COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#" -e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#" -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_PATH}/${CMAKE_CFG_INTDIR}#" + -e "s#\@LLVM_LIBS_DIR\@#${LLVM_LIBS_PATH}/${CMAKE_CFG_INTDIR}#" -e "s#\@CLANG_SOURCE_DIR\@#${CMAKE_CURRENT_SOURCE_DIR}/..#" -e "s#\@CLANG_BINARY_DIR\@#${CMAKE_CURRENT_BINARY_DIR}/..#" ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in > @@ -51,6 +53,7 @@ if(PYTHONINTERP_FOUND) COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#" -e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#" -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_PATH}/${CMAKE_CFG_INTDIR}#" + -e "s#\@LLVM_LIBS_DIR\@#${LLVM_LIBS_PATH}/${CMAKE_CFG_INTDIR}#" -e "s#\@CLANG_SOURCE_DIR\@#${CMAKE_CURRENT_SOURCE_DIR}/..#" -e "s#\@CLANG_BINARY_DIR\@#${CMAKE_CURRENT_BINARY_DIR}/..#" ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in > @@ -66,6 +69,7 @@ if(PYTHONINTERP_FOUND) COMMAND sed -e "s#\@LLVM_SOURCE_DIR\@#${LLVM_MAIN_SRC_DIR}#" -e "s#\@LLVM_BINARY_DIR\@#${LLVM_BINARY_DIR}#" -e "s#\@LLVM_TOOLS_DIR\@#${LLVM_TOOLS_PATH}/${CMAKE_CFG_INTDIR}#" + -e "s#\@LLVM_LIBS_DIR\@#${LLVM_LIBS_PATH}/${CMAKE_CFG_INTDIR}#" -e "s#\@CLANG_SOURCE_DIR\@#${CMAKE_CURRENT_SOURCE_DIR}/..#" -e "s#\@CLANG_BINARY_DIR\@#${CMAKE_CURRENT_BINARY_DIR}/..#" ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in > diff --git a/test/Makefile b/test/Makefile index 6ed13d6b88..9303a58171 100644 --- a/test/Makefile +++ b/test/Makefile @@ -37,6 +37,7 @@ lit.site.cfg: FORCE @sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \ -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \ -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \ + -e "s#@LLVM_LIBS_DIR@#$(LibDir)#g" \ -e "s#@CLANG_SOURCE_DIR@#$(PROJ_SRC_DIR)/..#g" \ -e "s#@CLANG_BINARY_DIR@#$(PROJ_OBJ_DIR)/..#g" \ $(PROJ_SRC_DIR)/lit.site.cfg.in > $@ diff --git a/test/lit.cfg b/test/lit.cfg index ce13f1065c..60d8df0577 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -39,6 +39,13 @@ if clang_obj_root is not None: path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) config.environment['PATH'] = path + llvm_libs_dir = getattr(config, 'llvm_libs_dir', None) + if not llvm_libs_dir: + lit.fatal('No LLVM libs dir set!') + path = os.path.pathsep.join((llvm_libs_dir, + config.environment.get('LD_LIBRARY_PATH',''))) + config.environment['LD_LIBRARY_PATH'] = path + ### # Check that the object root is known. diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index eab8793517..9dabafcde1 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -3,6 +3,7 @@ config.llvm_src_root = "@LLVM_SOURCE_DIR@" config.llvm_obj_root = "@LLVM_BINARY_DIR@" config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" +config.llvm_libs_dir = "@LLVM_LIBS_DIR@" config.clang_obj_root = "@CLANG_BINARY_DIR@" # Let the main config do the real work. |