[cfe-commits] r85881 - in /cfe/trunk/test: CMakeLists.txt Makefile lit.site.cfg.in

Daniel Dunbar daniel at zuster.org
Mon Nov 2 23:25:53 PST 2009


Author: ddunbar
Date: Tue Nov  3 01:25:53 2009
New Revision: 85881

URL: http://llvm.org/viewvc/llvm-project?rev=85881&view=rev
Log:
Add target_triple to Clang site configuration.

Modified:
    cfe/trunk/test/CMakeLists.txt
    cfe/trunk/test/Makefile
    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=85881&r1=85880&r2=85881&view=diff

==============================================================================
--- cfe/trunk/test/CMakeLists.txt (original)
+++ cfe/trunk/test/CMakeLists.txt Tue Nov  3 01:25:53 2009
@@ -24,6 +24,7 @@
 
 include(FindPythonInterp)
 if(PYTHONINTERP_FOUND)
+  get_target_triple(TARGET_TRIPLE)
   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)
@@ -32,16 +33,17 @@
   endif()
 
   foreach(testdir ${CLANG_TEST_DIRECTORIES})
-    add_custom_target(clang-test-${testdir} 
+    add_custom_target(clang-test-${testdir}
       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}/..#"
+                  -e "s#\@TARGET_TRIPLE\@#${TARGET_TRIPLE}#"
                   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in >
                   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
-      COMMAND ${PYTHON_EXECUTABLE} 
+      COMMAND ${PYTHON_EXECUTABLE}
                   ${LLVM_SOURCE_DIR}/utils/lit/lit.py
                   -sv ${CLANG_TEST_EXTRA_ARGS}
                   ${CMAKE_CURRENT_BINARY_DIR}/${testdir}
@@ -56,9 +58,10 @@
                 -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}/..#"
+                -e "s#\@TARGET_TRIPLE\@#${TARGET_TRIPLE}#"
                 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in >
                 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
-    COMMAND ${PYTHON_EXECUTABLE} 
+    COMMAND ${PYTHON_EXECUTABLE}
                 ${LLVM_SOURCE_DIR}/utils/lit/lit.py
                 -sv ${CLANG_TEST_EXTRA_ARGS}
                 ${CMAKE_CURRENT_BINARY_DIR}
@@ -72,12 +75,13 @@
                 -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}/..#"
+                -e "s#\@TARGET_TRIPLE\@#${TARGET_TRIPLE}#"
                 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in >
                 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
-    COMMAND ${PYTHON_EXECUTABLE} 
+    COMMAND ${PYTHON_EXECUTABLE}
                 ${LLVM_SOURCE_DIR}/utils/lit/lit.py
                 -sv ${CLANG_TEST_EXTRA_ARGS}
                 ${CMAKE_CURRENT_SOURCE_DIR}/../utils/C++Tests
                 DEPENDS clang clang-cc index-test c-index-test
                 COMMENT "Running Clang regression tests")
-endif()  
+endif()

Modified: cfe/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Makefile?rev=85881&r1=85880&r2=85881&view=diff

==============================================================================
--- cfe/trunk/test/Makefile (original)
+++ cfe/trunk/test/Makefile Tue Nov  3 01:25:53 2009
@@ -40,6 +40,7 @@
 	     -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" \
+	     -e "s#@TARGET_TRIPLE@#$(TARGET_TRIPLE)#g" \
 	     $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
 
 clean::

Modified: cfe/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.site.cfg.in?rev=85881&r1=85880&r2=85881&view=diff

==============================================================================
--- cfe/trunk/test/lit.site.cfg.in (original)
+++ cfe/trunk/test/lit.site.cfg.in Tue Nov  3 01:25:53 2009
@@ -5,6 +5,7 @@
 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
 config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
 config.clang_obj_root = "@CLANG_BINARY_DIR@"
+config.target_triple = "@TARGET_TRIPLE@"
 
 # Let the main config do the real work.
 lit.load_config(config, "@CLANG_SOURCE_DIR@/test/lit.cfg")





More information about the cfe-commits mailing list