Skip to content

Commit 4d4fef2

Browse files
committed
Revert a few unsuccessful attempts at fixing bots.
I broke bots last week and tried a few things to fix them. These were attempts that didn't help, so back them back out. This reverts commit c7aff9a. This reverts commit 8838d6d. This reverts commit e875ba1.
1 parent 215e6bf commit 4d4fef2

File tree

6 files changed

+33
-34
lines changed

6 files changed

+33
-34
lines changed

clang/test/Unit/lit.site.cfg.py.in

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
import sys
44

5-
config.llvm_src_root = path("@LLVM_SOURCE_DIR@")
6-
config.llvm_obj_root = path("@LLVM_BINARY_DIR@")
7-
config.llvm_tools_dir = path("@LLVM_TOOLS_DIR@")
8-
config.llvm_libs_dir = path("@LLVM_LIBS_DIR@")
5+
config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@")
6+
config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
7+
config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@")
8+
config.llvm_libs_dir = path(r"@LLVM_LIBS_DIR@")
99
config.llvm_build_mode = "@LLVM_BUILD_MODE@"
10-
config.clang_obj_root = path("@CLANG_BINARY_DIR@")
10+
config.clang_obj_root = path(r"@CLANG_BINARY_DIR@")
1111
config.enable_shared = @ENABLE_SHARED@
12-
config.shlibdir = path("@SHLIBDIR@")
12+
config.shlibdir = path(r"@SHLIBDIR@")
1313
config.target_triple = "@TARGET_TRIPLE@"
1414

1515
# Support substitution of the tools_dir, libs_dirs, and build_mode with user
@@ -26,4 +26,4 @@ except KeyError:
2626

2727
# Let the main config do the real work.
2828
lit_config.load_config(
29-
config, os.path.join(path("@CLANG_SOURCE_DIR@"), "test/Unit/lit.cfg.py"))
29+
config, os.path.join(path(r"@CLANG_SOURCE_DIR@"), "test/Unit/lit.cfg.py"))

clang/test/lit.site.cfg.py.in

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
import sys
44

5-
config.llvm_src_root = path("@LLVM_SOURCE_DIR@")
6-
config.llvm_obj_root = path("@LLVM_BINARY_DIR@")
7-
config.llvm_tools_dir = path("@LLVM_TOOLS_DIR@")
8-
config.llvm_libs_dir = path("@LLVM_LIBS_DIR@")
9-
config.llvm_shlib_dir = path("@SHLIBDIR@")
5+
config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@")
6+
config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
7+
config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@")
8+
config.llvm_libs_dir = path(r"@LLVM_LIBS_DIR@")
9+
config.llvm_shlib_dir = path(r"@SHLIBDIR@")
1010
config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
11-
config.lit_tools_dir = path("@LLVM_LIT_TOOLS_DIR@")
12-
config.clang_obj_root = path("@CLANG_BINARY_DIR@")
13-
config.clang_src_dir = path("@CLANG_SOURCE_DIR@")
14-
config.clang_tools_dir = path("@CLANG_TOOLS_DIR@")
11+
config.lit_tools_dir = path(r"@LLVM_LIT_TOOLS_DIR@")
12+
config.clang_obj_root = path(r"@CLANG_BINARY_DIR@")
13+
config.clang_src_dir = path(r"@CLANG_SOURCE_DIR@")
14+
config.clang_tools_dir = path(r"@CLANG_TOOLS_DIR@")
1515
config.host_triple = "@LLVM_HOST_TRIPLE@"
1616
config.target_triple = "@TARGET_TRIPLE@"
1717
config.host_cxx = "@CMAKE_CXX_COMPILER@"

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,7 @@ endmacro()
13991399
function(make_paths_relative out_pathlist basedir pathlist)
14001400
# Passing ARG_PATH_VALUES as-is to execute_process() makes cmake strip
14011401
# empty list entries. So escape the ;s in the list and do the splitting
1402-
# outselves. cmake has no relpath function, so use Python for that.
1402+
# ourselves. cmake has no relpath function, so use Python for that.
14031403
string(REPLACE ";" "\\;" pathlist_escaped "${pathlist}")
14041404
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "\n
14051405
import os, sys\n
@@ -1411,7 +1411,7 @@ def relpath(p):\n
14111411
if not p: return ''\n
14121412
if os.path.splitdrive(p)[0] != os.path.splitdrive(base)[0]: return p\n
14131413
if haslink(p) or haslink(base): return p\n
1414-
return os.path.relpath(p, base).replace(os.sep, '/')\n
1414+
return os.path.relpath(p, base)\n
14151415
sys.stdout.write(';'.join(relpath(p) for p in sys.argv[2].split(';')))"
14161416
${basedir}
14171417
${pathlist_escaped}
@@ -1430,11 +1430,10 @@ string(CONCAT LLVM_LIT_PATH_FUNCTION
14301430
# important that this restores the on-disk case of the prefix.
14311431
"# Allow generated file to be relocatable.\n"
14321432
"def path(p):\n"
1433-
" if not p: return ''\n"
1434-
" p = os.path.join(os.path.dirname(os.path.abspath(__file__)), p)\n"
1435-
" p = os.path.normpath(p).replace(os.sep, '/')\n"
1436-
" if os.name == 'nt' and os.path.isabs(p): return p[0].upper() + p[1:]\n"
1437-
" return p\n"
1433+
" if not p: return ''\n"
1434+
" p = os.path.join(os.path.dirname(os.path.abspath(__file__)), p)\n"
1435+
" if os.name == 'nt' and os.path.isabs(p): return p[0].upper() + p[1:]\n"
1436+
" return p\n"
14381437
)
14391438

14401439
# This function provides an automatic way to 'configure'-like generate a file

llvm/test/Unit/lit.site.cfg.py.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
import sys
44

5-
config.llvm_src_root = path("@LLVM_SOURCE_DIR@")
6-
config.llvm_obj_root = path("@LLVM_BINARY_DIR@")
7-
config.llvm_tools_dir = path("@LLVM_TOOLS_DIR@")
5+
config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@")
6+
config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
7+
config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@")
88
config.llvm_build_mode = "@LLVM_BUILD_MODE@"
99
config.enable_shared = @ENABLE_SHARED@
10-
config.shlibdir = path("@SHLIBDIR@")
10+
config.shlibdir = path(r"@SHLIBDIR@")
1111

1212
# Support substitution of the tools_dir and build_mode with user parameters.
1313
# This is used when we can't determine the tool dir at configuration time.

llvm/test/lit.site.cfg.py.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import sys
44

55
config.host_triple = "@LLVM_HOST_TRIPLE@"
66
config.target_triple = "@TARGET_TRIPLE@"
7-
config.llvm_src_root = path("@LLVM_SOURCE_DIR@")
8-
config.llvm_obj_root = path("@LLVM_BINARY_DIR@")
9-
config.llvm_tools_dir = path("@LLVM_TOOLS_DIR@")
10-
config.llvm_lib_dir = path("@LLVM_LIBRARY_DIR@")
11-
config.llvm_shlib_dir = path("@SHLIBDIR@")
7+
config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@")
8+
config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
9+
config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@")
10+
config.llvm_lib_dir = path(r"@LLVM_LIBRARY_DIR@")
11+
config.llvm_shlib_dir = path(r"@SHLIBDIR@")
1212
config.llvm_shlib_ext = "@SHLIBEXT@"
1313
config.llvm_exe_ext = "@EXEEXT@"
14-
config.lit_tools_dir = path("@LLVM_LIT_TOOLS_DIR@")
14+
config.lit_tools_dir = path(r"@LLVM_LIT_TOOLS_DIR@")
1515
config.python_executable = "@PYTHON_EXECUTABLE@"
1616
config.gold_executable = "@GOLD_EXECUTABLE@"
1717
config.ld64_executable = "@LD64_EXECUTABLE@"

llvm/utils/llvm-lit/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if (${file_last} GREATER -1)
2222
list(GET LLVM_LIT_CONFIG_FILES ${i} main_config)
2323
math(EXPR i1 "${i} + 1")
2424
list(GET LLVM_LIT_CONFIG_FILES ${i1} site_out)
25-
set(map "map_config(path('${main_config}'), path('${site_out}'))")
25+
set(map "map_config(path(r'${main_config}'), path(r'${site_out}'))")
2626
set(LLVM_LIT_CONFIG_MAP "${LLVM_LIT_CONFIG_MAP}\n${map}")
2727
endforeach()
2828
endif()

0 commit comments

Comments
 (0)