[cfe-commits] r82853 - in /cfe/trunk/test: CMakeLists.txt Makefile lit.cfg lit.site.cfg.in
Daniel Dunbar
daniel at zuster.org
Sat Sep 26 00:36:10 PDT 2009
Author: ddunbar
Date: Sat Sep 26 02:36:09 2009
New Revision: 82853
URL: http://llvm.org/viewvc/llvm-project?rev=82853&view=rev
Log:
Add the lib path to LD_LIBRARY_PATH, so finding .so works (more) portably.
Modified:
cfe/trunk/test/CMakeLists.txt
cfe/trunk/test/Makefile
cfe/trunk/test/lit.cfg
cfe/trunk/test/lit.site.cfg.in
Modified: cfe/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CMakeLists.txt?rev=82853&r1=82852&r2=82853&view=diff
==============================================================================
--- cfe/trunk/test/CMakeLists.txt (original)
+++ cfe/trunk/test/CMakeLists.txt Sat Sep 26 02:36:09 2009
@@ -25,6 +25,7 @@
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 @@
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 @@
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 @@
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 >
Modified: cfe/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Makefile?rev=82853&r1=82852&r2=82853&view=diff
==============================================================================
--- cfe/trunk/test/Makefile (original)
+++ cfe/trunk/test/Makefile Sat Sep 26 02:36:09 2009
@@ -37,6 +37,7 @@
@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 > $@
Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=82853&r1=82852&r2=82853&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Sat Sep 26 02:36:09 2009
@@ -39,6 +39,13 @@
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.
Modified: cfe/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.site.cfg.in?rev=82853&r1=82852&r2=82853&view=diff
==============================================================================
--- cfe/trunk/test/lit.site.cfg.in (original)
+++ cfe/trunk/test/lit.site.cfg.in Sat Sep 26 02:36:09 2009
@@ -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.
More information about the cfe-commits
mailing list