File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,12 @@ math(EXPR file_last "${file_len} - 1")
44
55get_llvm_lit_path(LIT_BASE_DIR LIT_FILE_NAME)
66
7- set (LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR} )
8-
97# LLVM_LIT_CONFIG_FILES contains interleaved main config (in the source tree)
108# and site config (in the build tree) pairs. Make them relative to
119# llvm-lit and then convert them to map_config() calls.
1210if ("${CMAKE_CFG_INTDIR} " STREQUAL "." )
1311 make_paths_relative(
14- LLVM_LIT_CONFIG_FILES "${LIT_BASE_DIR} " "${LLVM_LIT_CONFIG_FILES} " )
15- make_paths_relative(
16- LLVM_SOURCE_DIR "${LIT_BASE_DIR} " "${LLVM_SOURCE_DIR} " )
12+ LLVM_LIT_CONFIG_FILES "${LIT_BASE_DIR} " "${LLVM_LIT_CONFIG_FILES} " )
1713endif ()
1814
1915set (LLVM_LIT_CONFIG_MAP "${LLVM_LIT_PATH_FUNCTION} \n " )
@@ -27,6 +23,8 @@ if (${file_last} GREATER -1)
2723 endforeach ()
2824endif ()
2925
26+ set (LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR} )
27+
3028if (NOT "${CMAKE_CFG_INTDIR} " STREQUAL "." )
3129 foreach (BUILD_MODE ${CMAKE_CONFIGURATION_TYPES} )
3230 string (REPLACE ${CMAKE_CFG_INTDIR} ${BUILD_MODE} bi ${LIT_BASE_DIR} )
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ def map_config(source_dir, site_config):
1313 site_config = os .path .normpath (site_config )
1414 config_map [source_dir ] = site_config
1515
16+ # Variables configured at build time.
17+ llvm_source_root = "@LLVM_SOURCE_DIR@"
18+
19+ # Make sure we can find the lit package.
20+ sys .path .insert (0 , os .path .join (llvm_source_root , 'utils' , 'lit' ))
21+
1622# Set up some builtin parameters, so that by default the LLVM test suite
1723# configuration file knows how to find the object tree.
1824builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
@@ -21,10 +27,6 @@ builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
2127
2228builtin_parameters ['config_map' ] = config_map
2329
24- # Make sure we can find the lit package.
25- llvm_source_root = path ("@LLVM_SOURCE_DIR@" )
26- sys .path .insert (0 , os .path .join (llvm_source_root , 'utils' , 'lit' ))
27-
2830if __name__ == '__main__' :
2931 from lit .main import main
3032 main (builtin_parameters )
You can’t perform that action at this time.
0 commit comments