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,12 +4,16 @@ 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+
79# LLVM_LIT_CONFIG_FILES contains interleaved main config (in the source tree)
810# and site config (in the build tree) pairs. Make them relative to
911# llvm-lit and then convert them to map_config() calls.
1012if ("${CMAKE_CFG_INTDIR} " STREQUAL "." )
1113 make_paths_relative(
12- LLVM_LIT_CONFIG_FILES "${LIT_BASE_DIR} " "${LLVM_LIT_CONFIG_FILES} " )
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} " )
1317endif ()
1418
1519set (LLVM_LIT_CONFIG_MAP "${LLVM_LIT_PATH_FUNCTION} \n " )
@@ -23,8 +27,6 @@ if (${file_last} GREATER -1)
2327 endforeach ()
2428endif ()
2529
26- set (LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR} )
27-
2830if (NOT "${CMAKE_CFG_INTDIR} " STREQUAL "." )
2931 foreach (BUILD_MODE ${CMAKE_CONFIGURATION_TYPES} )
3032 string (REPLACE ${CMAKE_CFG_INTDIR} ${BUILD_MODE} bi ${LIT_BASE_DIR} )
Original file line number Diff line number Diff line change @@ -13,12 +13,6 @@ 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-
2216# Set up some builtin parameters, so that by default the LLVM test suite
2317# configuration file knows how to find the object tree.
2418builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
@@ -27,6 +21,10 @@ builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
2721
2822builtin_parameters ['config_map' ] = config_map
2923
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+
3028if __name__ == '__main__' :
3129 from lit .main import main
3230 main (builtin_parameters )
You can’t perform that action at this time.
0 commit comments