Skip to content

Commit 3185881

Browse files
Revert "Make llvm_source_root in llvm-lit relative too."
This reverts commit 6c1a9fb. Commit causes failures: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/49206
1 parent 1b7560b commit 3185881

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

llvm/utils/llvm-lit/CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ math(EXPR file_last "${file_len} - 1")
44

55
get_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.
1210
if("${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}")
1713
endif()
1814

1915
set(LLVM_LIT_CONFIG_MAP "${LLVM_LIT_PATH_FUNCTION}\n")
@@ -27,6 +23,8 @@ if (${file_last} GREATER -1)
2723
endforeach()
2824
endif()
2925

26+
set(LLVM_SOURCE_DIR ${LLVM_MAIN_SRC_DIR})
27+
3028
if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
3129
foreach(BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
3230
string(REPLACE ${CMAKE_CFG_INTDIR} ${BUILD_MODE} bi ${LIT_BASE_DIR})

llvm/utils/llvm-lit/llvm-lit.in

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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.
1824
builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
@@ -21,10 +27,6 @@ builtin_parameters = { 'build_mode' : "@BUILD_MODE@" }
2127
2228
builtin_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-
2830
if __name__=='__main__':
2931
from lit.main import main
3032
main(builtin_parameters)

0 commit comments

Comments
 (0)