From 4d4fef22dac75c9a9ba3e14742dd681e6c5f935d Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 13 Apr 2020 16:53:06 -0400 Subject: [PATCH] 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 c7aff9a109b611e4954a3055061a8076b4baa385. This reverts commit 8838d6d3566d940859fd26b20aed4cb57d490988. This reverts commit e875ba1509955dc4b3512d820edecc0da26fa38d. --- clang/test/Unit/lit.site.cfg.py.in | 14 +++++++------- clang/test/lit.site.cfg.py.in | 18 +++++++++--------- llvm/cmake/modules/AddLLVM.cmake | 13 ++++++------- llvm/test/Unit/lit.site.cfg.py.in | 8 ++++---- llvm/test/lit.site.cfg.py.in | 12 ++++++------ llvm/utils/llvm-lit/CMakeLists.txt | 2 +- 6 files changed, 33 insertions(+), 34 deletions(-) diff --git a/clang/test/Unit/lit.site.cfg.py.in b/clang/test/Unit/lit.site.cfg.py.in index 400a9c0..ad5e6d0 100644 --- a/clang/test/Unit/lit.site.cfg.py.in +++ b/clang/test/Unit/lit.site.cfg.py.in @@ -2,14 +2,14 @@ import sys -config.llvm_src_root = path("@LLVM_SOURCE_DIR@") -config.llvm_obj_root = path("@LLVM_BINARY_DIR@") -config.llvm_tools_dir = path("@LLVM_TOOLS_DIR@") -config.llvm_libs_dir = path("@LLVM_LIBS_DIR@") +config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@") +config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@") +config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@") +config.llvm_libs_dir = path(r"@LLVM_LIBS_DIR@") config.llvm_build_mode = "@LLVM_BUILD_MODE@" -config.clang_obj_root = path("@CLANG_BINARY_DIR@") +config.clang_obj_root = path(r"@CLANG_BINARY_DIR@") config.enable_shared = @ENABLE_SHARED@ -config.shlibdir = path("@SHLIBDIR@") +config.shlibdir = path(r"@SHLIBDIR@") config.target_triple = "@TARGET_TRIPLE@" # Support substitution of the tools_dir, libs_dirs, and build_mode with user @@ -26,4 +26,4 @@ except KeyError: # Let the main config do the real work. lit_config.load_config( - config, os.path.join(path("@CLANG_SOURCE_DIR@"), "test/Unit/lit.cfg.py")) + config, os.path.join(path(r"@CLANG_SOURCE_DIR@"), "test/Unit/lit.cfg.py")) diff --git a/clang/test/lit.site.cfg.py.in b/clang/test/lit.site.cfg.py.in index 84dd0f8..daec694 100644 --- a/clang/test/lit.site.cfg.py.in +++ b/clang/test/lit.site.cfg.py.in @@ -2,16 +2,16 @@ import sys -config.llvm_src_root = path("@LLVM_SOURCE_DIR@") -config.llvm_obj_root = path("@LLVM_BINARY_DIR@") -config.llvm_tools_dir = path("@LLVM_TOOLS_DIR@") -config.llvm_libs_dir = path("@LLVM_LIBS_DIR@") -config.llvm_shlib_dir = path("@SHLIBDIR@") +config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@") +config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@") +config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@") +config.llvm_libs_dir = path(r"@LLVM_LIBS_DIR@") +config.llvm_shlib_dir = path(r"@SHLIBDIR@") config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@" -config.lit_tools_dir = path("@LLVM_LIT_TOOLS_DIR@") -config.clang_obj_root = path("@CLANG_BINARY_DIR@") -config.clang_src_dir = path("@CLANG_SOURCE_DIR@") -config.clang_tools_dir = path("@CLANG_TOOLS_DIR@") +config.lit_tools_dir = path(r"@LLVM_LIT_TOOLS_DIR@") +config.clang_obj_root = path(r"@CLANG_BINARY_DIR@") +config.clang_src_dir = path(r"@CLANG_SOURCE_DIR@") +config.clang_tools_dir = path(r"@CLANG_TOOLS_DIR@") config.host_triple = "@LLVM_HOST_TRIPLE@" config.target_triple = "@TARGET_TRIPLE@" config.host_cxx = "@CMAKE_CXX_COMPILER@" diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake index 1cde371..633a3b0 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -1399,7 +1399,7 @@ endmacro() function(make_paths_relative out_pathlist basedir pathlist) # Passing ARG_PATH_VALUES as-is to execute_process() makes cmake strip # empty list entries. So escape the ;s in the list and do the splitting - # outselves. cmake has no relpath function, so use Python for that. + # ourselves. cmake has no relpath function, so use Python for that. string(REPLACE ";" "\\;" pathlist_escaped "${pathlist}") execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "\n import os, sys\n @@ -1411,7 +1411,7 @@ def relpath(p):\n if not p: return ''\n if os.path.splitdrive(p)[0] != os.path.splitdrive(base)[0]: return p\n if haslink(p) or haslink(base): return p\n - return os.path.relpath(p, base).replace(os.sep, '/')\n + return os.path.relpath(p, base)\n sys.stdout.write(';'.join(relpath(p) for p in sys.argv[2].split(';')))" ${basedir} ${pathlist_escaped} @@ -1430,11 +1430,10 @@ string(CONCAT LLVM_LIT_PATH_FUNCTION # important that this restores the on-disk case of the prefix. "# Allow generated file to be relocatable.\n" "def path(p):\n" - " if not p: return ''\n" - " p = os.path.join(os.path.dirname(os.path.abspath(__file__)), p)\n" - " p = os.path.normpath(p).replace(os.sep, '/')\n" - " if os.name == 'nt' and os.path.isabs(p): return p[0].upper() + p[1:]\n" - " return p\n" + " if not p: return ''\n" + " p = os.path.join(os.path.dirname(os.path.abspath(__file__)), p)\n" + " if os.name == 'nt' and os.path.isabs(p): return p[0].upper() + p[1:]\n" + " return p\n" ) # This function provides an automatic way to 'configure'-like generate a file diff --git a/llvm/test/Unit/lit.site.cfg.py.in b/llvm/test/Unit/lit.site.cfg.py.in index 3358ccf..f9fe421 100644 --- a/llvm/test/Unit/lit.site.cfg.py.in +++ b/llvm/test/Unit/lit.site.cfg.py.in @@ -2,12 +2,12 @@ import sys -config.llvm_src_root = path("@LLVM_SOURCE_DIR@") -config.llvm_obj_root = path("@LLVM_BINARY_DIR@") -config.llvm_tools_dir = path("@LLVM_TOOLS_DIR@") +config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@") +config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@") +config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@") config.llvm_build_mode = "@LLVM_BUILD_MODE@" config.enable_shared = @ENABLE_SHARED@ -config.shlibdir = path("@SHLIBDIR@") +config.shlibdir = path(r"@SHLIBDIR@") # Support substitution of the tools_dir and build_mode with user parameters. # This is used when we can't determine the tool dir at configuration time. diff --git a/llvm/test/lit.site.cfg.py.in b/llvm/test/lit.site.cfg.py.in index 2af0ec3..ee9e594 100644 --- a/llvm/test/lit.site.cfg.py.in +++ b/llvm/test/lit.site.cfg.py.in @@ -4,14 +4,14 @@ import sys config.host_triple = "@LLVM_HOST_TRIPLE@" config.target_triple = "@TARGET_TRIPLE@" -config.llvm_src_root = path("@LLVM_SOURCE_DIR@") -config.llvm_obj_root = path("@LLVM_BINARY_DIR@") -config.llvm_tools_dir = path("@LLVM_TOOLS_DIR@") -config.llvm_lib_dir = path("@LLVM_LIBRARY_DIR@") -config.llvm_shlib_dir = path("@SHLIBDIR@") +config.llvm_src_root = path(r"@LLVM_SOURCE_DIR@") +config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@") +config.llvm_tools_dir = path(r"@LLVM_TOOLS_DIR@") +config.llvm_lib_dir = path(r"@LLVM_LIBRARY_DIR@") +config.llvm_shlib_dir = path(r"@SHLIBDIR@") config.llvm_shlib_ext = "@SHLIBEXT@" config.llvm_exe_ext = "@EXEEXT@" -config.lit_tools_dir = path("@LLVM_LIT_TOOLS_DIR@") +config.lit_tools_dir = path(r"@LLVM_LIT_TOOLS_DIR@") config.python_executable = "@PYTHON_EXECUTABLE@" config.gold_executable = "@GOLD_EXECUTABLE@" config.ld64_executable = "@LD64_EXECUTABLE@" diff --git a/llvm/utils/llvm-lit/CMakeLists.txt b/llvm/utils/llvm-lit/CMakeLists.txt index 1d4cbe4..895fa25 100644 --- a/llvm/utils/llvm-lit/CMakeLists.txt +++ b/llvm/utils/llvm-lit/CMakeLists.txt @@ -22,7 +22,7 @@ if (${file_last} GREATER -1) list(GET LLVM_LIT_CONFIG_FILES ${i} main_config) math(EXPR i1 "${i} + 1") list(GET LLVM_LIT_CONFIG_FILES ${i1} site_out) - set(map "map_config(path('${main_config}'), path('${site_out}'))") + set(map "map_config(path(r'${main_config}'), path(r'${site_out}'))") set(LLVM_LIT_CONFIG_MAP "${LLVM_LIT_CONFIG_MAP}\n${map}") endforeach() endif() -- 2.7.4