From bd653f915b5206b00ec86c8777d6ebf1fd3afcd8 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 9 Oct 2024 11:32:41 -0700 Subject: [PATCH 01/15] [lldb] Use SEND_ERROR instead of FATAL_ERROR in test/CMakeLists.txt (#111729) Use SEND_ERROR (continue processing, but skip generation) instead of FATAL_ERROR (stop processing and generation). This means that developers get to see all errors at once, instead of seeing just the first error and having to reconfigure to discover the next one. --- lldb/test/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt index 25dc559ed926f..1e72164ec2afc 100644 --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -3,7 +3,7 @@ # Lit requires a Python3 interpreter, let's be careful and fail early if it's # not present. if (NOT DEFINED Python3_EXECUTABLE) - message(FATAL_ERROR + message(SEND_ERROR "LLDB test suite requires a Python3 interpreter but none " "was found. Please install Python3 or disable tests with " "`LLDB_INCLUDE_TESTS=OFF`.") @@ -22,7 +22,7 @@ if(LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS) foreach(module ${useful_python_modules}) lldb_find_python_module(${module}) if (NOT PY_${module}_FOUND) - message(FATAL_ERROR + message(SEND_ERROR "Python module '${module}' not found. Please install it via pip or via " "your operating system's package manager. Alternatively, disable " "strict testing requirements with " @@ -66,10 +66,10 @@ if (LLDB_TEST_OBJC_GNUSTEP) find_package(GNUstepObjC) if (NOT GNUstepObjC_FOUND) if (LLDB_TEST_OBJC_GNUSTEP_DIR) - message(FATAL_ERROR "Failed to find GNUstep libobjc2 in ${LLDB_TEST_OBJC_GNUSTEP_DIR}. " + message(SEND_ERROR "Failed to find GNUstep libobjc2 in ${LLDB_TEST_OBJC_GNUSTEP_DIR}. " "Please check LLDB_TEST_OBJC_GNUSTEP_DIR or turn off LLDB_TEST_OBJC_GNUSTEP.") else() - message(FATAL_ERROR "Failed to find GNUstep libobjc2. " + message(SEND_ERROR "Failed to find GNUstep libobjc2. " "Please set LLDB_TEST_OBJC_GNUSTEP_DIR or turn off LLDB_TEST_OBJC_GNUSTEP.") endif() endif() @@ -185,7 +185,7 @@ if(TARGET clang) set(LIBCXX_LIBRARY_DIR "${LLDB_TEST_LIBCXX_ROOT_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}") set(LIBCXX_GENERATED_INCLUDE_DIR "${LLDB_TEST_LIBCXX_ROOT_DIR}/include/c++/v1") else() - message(FATAL_ERROR + message(SEND_ERROR "Couldn't find libcxx build in '${LLDB_TEST_LIBCXX_ROOT_DIR}'. To run the " "test-suite for a standalone LLDB build please build libcxx and point " "LLDB_TEST_LIBCXX_ROOT_DIR to it.") @@ -194,7 +194,7 @@ if(TARGET clang) # We require libcxx for the test suite, so if we aren't building it, # provide a helpful error about how to resolve the situation. if(NOT LLDB_HAS_LIBCXX) - message(FATAL_ERROR + message(SEND_ERROR "LLDB test suite requires libc++, but it is currently disabled. " "Please add `libcxx` to `LLVM_ENABLE_RUNTIMES` or disable tests via " "`LLDB_INCLUDE_TESTS=OFF`.") From 9406ee594cc3035a6ceef18c3e57c613228532fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Thu, 10 Oct 2024 11:34:19 +0200 Subject: [PATCH 02/15] [lldb] Check for Python 'packaging' module at configuration time (#111747) This module is used in various helper scripts since https://github.com/llvm/llvm-project/pull/93712 --- lldb/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt index 1e72164ec2afc..aef43dda67660 100644 --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -12,7 +12,7 @@ endif() if(LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS) message(STATUS "Enforcing strict test requirements for LLDB") # Lit uses psutil to do per-test timeouts. - set(useful_python_modules psutil) + set(useful_python_modules psutil packaging) if(NOT WIN32) # We no longer vendor pexpect and it is not used on Windows. From 7e801d1d0e6ed20a33d8e127306b02c2c19e64b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Thu, 10 Oct 2024 12:55:31 +0200 Subject: [PATCH 03/15] [lldb] Add early CMake check for 'make' tool (#111531) Many LLDB's dotest.py based tests require the `make` tool. If it's not found in Path, they fail with an obscure error and show up as `UNRESOLVED`. On Windows, llvm-lit takes care of MSYS based testing tools like cat, printf, etc., but `make` is not part of that. Let's catch the situation early and check for it at configuration time. This error isn't fatal: It should fail the build, but not immediately stop the configuration process. There might be other issues further down the line that can be caught in the same buildbot run. --- lldb/packages/Python/lldbsuite/test/dotest.py | 4 ---- lldb/test/API/CMakeLists.txt | 15 +++++++++++++++ lldb/test/API/lit.cfg.py | 3 +++ lldb/test/API/lit.site.cfg.py.in | 1 + 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 1cd5fec461460..e3fe46dada18e 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -268,10 +268,6 @@ def parseOptionsAndInitTestdirs(): if args.make: configuration.make_path = args.make - elif platform_system == "FreeBSD" or platform_system == "NetBSD": - configuration.make_path = "gmake" - else: - configuration.make_path = "make" if args.dsymutil: configuration.dsymutil = args.dsymutil diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt index 2b77531a13f6c..1d084be06bee8 100644 --- a/lldb/test/API/CMakeLists.txt +++ b/lldb/test/API/CMakeLists.txt @@ -65,6 +65,20 @@ set(LLDB_DEFAULT_TEST_EXECUTABLE "${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb${CMAKE_EXEC set(LLDB_DEFAULT_TEST_DSYMUTIL "${LLVM_TOOLS_BINARY_DIR}/dsymutil${CMAKE_EXECUTABLE_SUFFIX}") +if(LLDB_TEST_MAKE) + set(LLDB_DEFAULT_TEST_MAKE ${LLDB_TEST_MAKE}) +else() + find_program(LLDB_DEFAULT_TEST_MAKE make gmake) + if(LLDB_DEFAULT_TEST_MAKE) + message(STATUS "Found make: ${LLDB_DEFAULT_TEST_MAKE}") + else() + message(STATUS "Not found: make") + message(SEND_ERROR + "LLDB tests require 'make' tool. Please pass via `LLDB_TEST_MAKE` " + "(or otherwise disable tests with `LLDB_INCLUDE_TESTS=OFF`)") + endif() +endif() + if (TARGET clang) set(LLDB_DEFAULT_TEST_COMPILER "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}") else() @@ -74,6 +88,7 @@ endif() set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb executable used for testing") set(LLDB_TEST_COMPILER "${LLDB_DEFAULT_TEST_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors") set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil used for generating dSYM bundles") +set(LLDB_TEST_MAKE "${LLDB_DEFAULT_TEST_MAKE}" CACHE PATH "make tool used for building test executables") if ("${LLDB_TEST_COMPILER}" STREQUAL "") message(FATAL_ERROR "LLDB test compiler not specified. Tests will not run.") diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py index ee1e91597440a..d825ad330ff4f 100644 --- a/lldb/test/API/lit.cfg.py +++ b/lldb/test/API/lit.cfg.py @@ -278,6 +278,9 @@ def delete_module_cache(path): if is_configured("dsymutil"): dotest_cmd += ["--dsymutil", config.dsymutil] +if is_configured("make"): + dotest_cmd += ["--make", config.make] + if is_configured("llvm_tools_dir"): dotest_cmd += ["--llvm-tools-dir", config.llvm_tools_dir] diff --git a/lldb/test/API/lit.site.cfg.py.in b/lldb/test/API/lit.site.cfg.py.in index 4184436c63ba7..420e0aa4751b1 100644 --- a/lldb/test/API/lit.site.cfg.py.in +++ b/lldb/test/API/lit.site.cfg.py.in @@ -33,6 +33,7 @@ config.test_arch = '@LLDB_TEST_ARCH@' config.test_compiler = lit_config.substitute('@LLDB_TEST_COMPILER@') config.test_swift_compiler = lit_config.substitute('@LLDB_SWIFTC@') config.dsymutil = lit_config.substitute('@LLDB_TEST_DSYMUTIL@') +config.make = lit_config.substitute('@LLDB_TEST_MAKE@') config.has_libcxx = @LLDB_HAS_LIBCXX@ config.libcxx_libs_dir = "@LIBCXX_LIBRARY_DIR@" config.libcxx_include_dir = "@LIBCXX_GENERATED_INCLUDE_DIR@" From c22caa19618add632a952dfa4afb38a9cbec3143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Wed, 2 Oct 2024 21:10:26 +0200 Subject: [PATCH 04/15] [lldb] Fix deps loading for lldb-python on Windows and Python3.8+ (#9370) --- lldb/bindings/python/CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lldb/bindings/python/CMakeLists.txt b/lldb/bindings/python/CMakeLists.txt index e48fcb35aba3b..42299064fd8f7 100644 --- a/lldb/bindings/python/CMakeLists.txt +++ b/lldb/bindings/python/CMakeLists.txt @@ -198,6 +198,24 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar COMMENT "Copying Python DLL to LLDB binaries directory.") endif() + # Since Python3.8 the Windows runtime loads dependent DLLs only from the directory of the binary + # itself (and not Path). Windows has no RPATHs, so we must copy all DLLs that we depend on into + # the Python package. + if (WIN32) + # TARGET_RUNTIME_DLLS is supported in CMake 3.21+ + if ("${CMAKE_VERSION}" VERSION_LESS "3.21.0") + if (LLDB_INCLUDE_TESTS) + message(SEND_ERROR + "Your CMake version is ${CMAKE_VERSION}. In order to run LLDB tests " + "on Windows please upgrade to 3.21.0 at least (or disable tests with " + "LLDB_INCLUDE_TESTS=Off)") + endif() + else() + add_custom_command(TARGET ${swig_target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy -t ${lldb_python_target_dir} $ + COMMAND_EXPAND_LISTS) + endif() + endif() endfunction() From 1c4669101289b549a087e4fac08fa9765a9b7e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Tue, 15 Oct 2024 14:22:12 +0200 Subject: [PATCH 05/15] [lldb] Support tests with nested make invocations on Windows 1/2 (#112342) In recent PR https://github.com/llvm/llvm-project/pull/111531 for Windows support, we enabled tests that require the `make` tool. On Windows, default install directories likely contain spaces, in this case e.g. `C:\Program Files (x86)\GnuWin32\bin\make.exe`. It's typically handled well by CMake, so that today invocations from `dotest.py` don't cause issues. However, we also have nested invocations from a number of Makefiles themselves. These still failed if the path to the `make` tool contains spaces. This patch attempts to fix the functionalities/completion test by adding quotes in the respective Makefile. If it keeps passing on the bots, we can roll out the fix to all affected tests. --- lldb/test/API/functionalities/completion/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/test/API/functionalities/completion/Makefile b/lldb/test/API/functionalities/completion/Makefile index f46742243bd96..e457693f62ca4 100644 --- a/lldb/test/API/functionalities/completion/Makefile +++ b/lldb/test/API/functionalities/completion/Makefile @@ -4,7 +4,7 @@ USE_LIBDL := 1 a.out: lib_shared lib_shared: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=shared.cpp DYLIB_NAME=shared include Makefile.rules From 5ec38f7d331347fcfb01079429136a18e4c933ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Wed, 16 Oct 2024 13:07:02 +0200 Subject: [PATCH 06/15] [lldb] Support tests with nested make invocations on Windows 2/2 (#112360) Following up from https://github.com/llvm/llvm-project/pull/112342, we roll out the fix and quote nested `make` invocations in all API tests. --- .../commands/expression/top-level/Makefile | 2 +- .../commands/expression/weak_symbols/Makefile | 4 ++-- .../API/commands/target/create-deps/Makefile | 2 +- .../breakpoint/break_in_loaded_dylib/Makefile | 2 +- .../dlopen_other_executable/Makefile | 2 +- lldb/test/API/functionalities/exec/Makefile | 2 +- .../functionalities/jitloader_gdb/Makefile | 2 +- .../functionalities/limit-debug-info/Makefile | 4 ++-- .../load_after_attach/Makefile | 2 +- .../API/functionalities/load_lazy/Makefile | 6 +++--- .../API/functionalities/load_unload/Makefile | 10 +++++----- .../functionalities/load_using_paths/Makefile | 2 +- .../functionalities/scripted_process/Makefile | 2 +- .../stop-on-sharedlibrary-load/Makefile | 4 ++-- .../tail_call_frames/cross_dso/Makefile | 2 +- .../target-new-solib-notifications/Makefile | 20 +++++++++---------- .../API/lang/c/conflicting-symbol/Makefile | 2 +- .../API/lang/cpp/incomplete-types/Makefile | 2 +- .../lang/cpp/namespace_definitions/Makefile | 4 ++-- .../lang/objc/conflicting-definition/Makefile | 4 ++-- .../lang/objc/modules-hash-mismatch/Makefile | 2 +- .../API/macosx/delay-init-dependency/Makefile | 2 +- .../API/macosx/expedited-thread-pcs/Makefile | 2 +- lldb/test/API/macosx/indirect_symbol/Makefile | 4 ++-- .../API/macosx/lc-note/kern-ver-str/Makefile | 2 +- .../lc-note/multiple-binary-corefile/Makefile | 4 ++-- .../macCatalystAppMacOSFramework/Makefile | 2 +- lldb/test/API/macosx/skinny-corefile/Makefile | 4 ++-- .../API/tools/lldb-dap/breakpoint/Makefile | 2 +- .../tools/lldb-server/libraries-svr4/Makefile | 4 ++-- 30 files changed, 54 insertions(+), 54 deletions(-) diff --git a/lldb/test/API/commands/expression/top-level/Makefile b/lldb/test/API/commands/expression/top-level/Makefile index e5e9e78d4ead2..51b27ddbb3c2f 100644 --- a/lldb/test/API/commands/expression/top-level/Makefile +++ b/lldb/test/API/commands/expression/top-level/Makefile @@ -5,6 +5,6 @@ all: dummy include Makefile.rules dummy: dummy.cpp - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ CXX_SOURCES=dummy.cpp EXE=dummy diff --git a/lldb/test/API/commands/expression/weak_symbols/Makefile b/lldb/test/API/commands/expression/weak_symbols/Makefile index 6fd8133312ade..1636e9b303263 100644 --- a/lldb/test/API/commands/expression/weak_symbols/Makefile +++ b/lldb/test/API/commands/expression/weak_symbols/Makefile @@ -9,12 +9,12 @@ a.out: libdylib.dylib include Makefile.rules libdylib.dylib: dylib.c - $(MAKE) -C $(BUILDDIR) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -C $(BUILDDIR) -f $(MAKEFILE_RULES) \ C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \ CFLAGS_EXTRAS=-DHAS_THEM LD_EXTRAS=-dynamiclib hidden/libdylib.dylib: mkdir hidden - $(MAKE) -C $(BUILDDIR)/hidden -f $(MAKEFILE_RULES) \ + "$(MAKE)" -C $(BUILDDIR)/hidden -f $(MAKEFILE_RULES) \ C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \ LD_EXTRAS=-dynamiclib diff --git a/lldb/test/API/commands/target/create-deps/Makefile b/lldb/test/API/commands/target/create-deps/Makefile index 3e5b1049b5a19..866d550ee7d0a 100644 --- a/lldb/test/API/commands/target/create-deps/Makefile +++ b/lldb/test/API/commands/target/create-deps/Makefile @@ -6,5 +6,5 @@ a.out: libload_a include Makefile.rules libload_a: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_NAME=load_a DYLIB_CXX_SOURCES=a.cpp diff --git a/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/Makefile b/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/Makefile index 0f3fb37bdadf3..112210e7e2c60 100644 --- a/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/Makefile +++ b/lldb/test/API/functionalities/breakpoint/break_in_loaded_dylib/Makefile @@ -2,7 +2,7 @@ CXX_SOURCES := main.cpp USE_LIBDL := 1 lib_b: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=lib_b all: lib_b diff --git a/lldb/test/API/functionalities/dlopen_other_executable/Makefile b/lldb/test/API/functionalities/dlopen_other_executable/Makefile index 113b9fd7d3f18..51fc01bdde75a 100644 --- a/lldb/test/API/functionalities/dlopen_other_executable/Makefile +++ b/lldb/test/API/functionalities/dlopen_other_executable/Makefile @@ -2,7 +2,7 @@ C_SOURCES := main.c USE_LIBDL := 1 other: - $(MAKE) -f $(MAKEFILE_RULES) C_SOURCES=other.c EXE=other + "$(MAKE)" -f $(MAKEFILE_RULES) C_SOURCES=other.c EXE=other all: other include Makefile.rules diff --git a/lldb/test/API/functionalities/exec/Makefile b/lldb/test/API/functionalities/exec/Makefile index 8b9148ea8a355..65d4680077d26 100644 --- a/lldb/test/API/functionalities/exec/Makefile +++ b/lldb/test/API/functionalities/exec/Makefile @@ -5,5 +5,5 @@ all: secondprog include Makefile.rules secondprog: secondprog.cpp - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ CXX_SOURCES=secondprog.cpp EXE=secondprog diff --git a/lldb/test/API/functionalities/jitloader_gdb/Makefile b/lldb/test/API/functionalities/jitloader_gdb/Makefile index 357b1f83684fe..9998cc9cf833c 100644 --- a/lldb/test/API/functionalities/jitloader_gdb/Makefile +++ b/lldb/test/API/functionalities/jitloader_gdb/Makefile @@ -5,5 +5,5 @@ all: a.out simple include Makefile.rules simple: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ C_SOURCES=simple.c EXE=simple diff --git a/lldb/test/API/functionalities/limit-debug-info/Makefile b/lldb/test/API/functionalities/limit-debug-info/Makefile index 874b3a15e0fee..fa867a7aeb7c6 100644 --- a/lldb/test/API/functionalities/limit-debug-info/Makefile +++ b/lldb/test/API/functionalities/limit-debug-info/Makefile @@ -17,11 +17,11 @@ include Makefile.rules a.out: libone libtwo libone: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=one.cpp DYLIB_NAME=one \ CFLAGS_EXTRAS="$(ONE_CXXFLAGS)" libtwo: libone - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=two.cpp DYLIB_NAME=two \ CFLAGS_EXTRAS="$(TWO_CXXFLAGS)" LD_EXTRAS="-L. -lone" diff --git a/lldb/test/API/functionalities/load_after_attach/Makefile b/lldb/test/API/functionalities/load_after_attach/Makefile index 0f3fb37bdadf3..112210e7e2c60 100644 --- a/lldb/test/API/functionalities/load_after_attach/Makefile +++ b/lldb/test/API/functionalities/load_after_attach/Makefile @@ -2,7 +2,7 @@ CXX_SOURCES := main.cpp USE_LIBDL := 1 lib_b: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=lib_b all: lib_b diff --git a/lldb/test/API/functionalities/load_lazy/Makefile b/lldb/test/API/functionalities/load_lazy/Makefile index 81bc7dcb4d05f..8e1d06b1e39c3 100644 --- a/lldb/test/API/functionalities/load_lazy/Makefile +++ b/lldb/test/API/functionalities/load_lazy/Makefile @@ -17,13 +17,13 @@ else endif t1: t2_0 - $(MAKE) VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \ + "$(MAKE)" VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_C_SOURCES=t1.c DYLIB_NAME=t1 LD_EXTRAS="-L. $(LINKFLAGS)" t2_0: - $(MAKE) VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \ + "$(MAKE)" VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_C_SOURCES=t2_0.c DYLIB_NAME=t2_0 t2_1: - $(MAKE) VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \ + "$(MAKE)" VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_C_SOURCES=t2_1.c DYLIB_NAME=t2_1 diff --git a/lldb/test/API/functionalities/load_unload/Makefile b/lldb/test/API/functionalities/load_unload/Makefile index e73ec73108764..dd7d16029427a 100644 --- a/lldb/test/API/functionalities/load_unload/Makefile +++ b/lldb/test/API/functionalities/load_unload/Makefile @@ -7,25 +7,25 @@ a.out: lib_b lib_a lib_c lib_d hidden_lib_d include Makefile.rules lib_a: lib_b - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=loadunload_a \ LD_EXTRAS="-L. -lloadunload_b" lib_b: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=loadunload_b lib_c: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=loadunload_c lib_d: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d ifeq ($(OS),Darwin) install_name_tool -id @executable_path/libloadunload_d.dylib libloadunload_d.dylib endif hidden_lib_d: hidden - $(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \ + "$(MAKE)" VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d diff --git a/lldb/test/API/functionalities/load_using_paths/Makefile b/lldb/test/API/functionalities/load_using_paths/Makefile index 814a96013756a..f973a389d585f 100644 --- a/lldb/test/API/functionalities/load_using_paths/Makefile +++ b/lldb/test/API/functionalities/load_using_paths/Makefile @@ -6,6 +6,6 @@ all: hidden_lib a.out include Makefile.rules hidden_lib: - $(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \ + "$(MAKE)" VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload diff --git a/lldb/test/API/functionalities/scripted_process/Makefile b/lldb/test/API/functionalities/scripted_process/Makefile index ba739451fc7ef..d4f12fbb3c4ef 100644 --- a/lldb/test/API/functionalities/scripted_process/Makefile +++ b/lldb/test/API/functionalities/scripted_process/Makefile @@ -9,7 +9,7 @@ CXXFLAGS_EXTRAS := -target $(TRIPLE) all: libbaz.dylib a.out libbaz.dylib: baz.cpp - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_NAME=baz DYLIB_CXX_SOURCES=baz.cpp include Makefile.rules diff --git a/lldb/test/API/functionalities/stop-on-sharedlibrary-load/Makefile b/lldb/test/API/functionalities/stop-on-sharedlibrary-load/Makefile index 4abcab84eac29..e4b0e86c0c36c 100644 --- a/lldb/test/API/functionalities/stop-on-sharedlibrary-load/Makefile +++ b/lldb/test/API/functionalities/stop-on-sharedlibrary-load/Makefile @@ -6,11 +6,11 @@ a.out: lib_a lib_b include Makefile.rules lib_a: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=load_a lib_b: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=load_b diff --git a/lldb/test/API/functionalities/tail_call_frames/cross_dso/Makefile b/lldb/test/API/functionalities/tail_call_frames/cross_dso/Makefile index 42c010be9a03a..963ce2ac94d92 100644 --- a/lldb/test/API/functionalities/tail_call_frames/cross_dso/Makefile +++ b/lldb/test/API/functionalities/tail_call_frames/cross_dso/Makefile @@ -10,4 +10,4 @@ a.out: lib_One lib_Two lib_One: lib_Two lib_%: - $(MAKE) VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk DSYMUTIL=$(DSYMUTIL) + "$(MAKE)" VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk DSYMUTIL=$(DSYMUTIL) diff --git a/lldb/test/API/functionalities/target-new-solib-notifications/Makefile b/lldb/test/API/functionalities/target-new-solib-notifications/Makefile index 6c61d210eeb2f..e3b48697fd783 100644 --- a/lldb/test/API/functionalities/target-new-solib-notifications/Makefile +++ b/lldb/test/API/functionalities/target-new-solib-notifications/Makefile @@ -1,23 +1,23 @@ CXX_SOURCES := main.cpp -LD_EXTRAS := -L. -l_d -l_c -l_a -l_b +LD_EXTRAS := -L. -l_d -l_c -l_a -l_b a.out: lib_b lib_a lib_c lib_d include Makefile.rules lib_a: lib_b - $(MAKE) -f $(MAKEFILE_RULES) \ - DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=_a \ - LD_EXTRAS="-L. -l_b" + "$(MAKE)" -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=_a \ + LD_EXTRAS="-L. -l_b" lib_b: - $(MAKE) -f $(MAKEFILE_RULES) \ - DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=_b + "$(MAKE)" -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=_b lib_c: - $(MAKE) -f $(MAKEFILE_RULES) \ - DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=_c + "$(MAKE)" -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=_c lib_d: - $(MAKE) -f $(MAKEFILE_RULES) \ - DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=_d + "$(MAKE)" -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=_d diff --git a/lldb/test/API/lang/c/conflicting-symbol/Makefile b/lldb/test/API/lang/c/conflicting-symbol/Makefile index 81594a1265da2..1331c4e1ebfaf 100644 --- a/lldb/test/API/lang/c/conflicting-symbol/Makefile +++ b/lldb/test/API/lang/c/conflicting-symbol/Makefile @@ -7,4 +7,4 @@ include Makefile.rules a.out: lib_One lib_Two lib_%: - $(MAKE) VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk + "$(MAKE)" VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk diff --git a/lldb/test/API/lang/cpp/incomplete-types/Makefile b/lldb/test/API/lang/cpp/incomplete-types/Makefile index f42ac2e81cc76..0cf3f6a31caa2 100644 --- a/lldb/test/API/lang/cpp/incomplete-types/Makefile +++ b/lldb/test/API/lang/cpp/incomplete-types/Makefile @@ -16,7 +16,7 @@ main.o: CFLAGS_EXTRAS = -flimit-debug-info limit: a.o main.o mkdir -p build_limit - $(MAKE) -C $(BUILDDIR)/build_limit -f $(MAKEFILE_RULES) \ + "$(MAKE)" -C $(BUILDDIR)/build_limit -f $(MAKEFILE_RULES) \ EXE=../limit CXX_SOURCES="length.cpp ../a.o ../main.o" \ CFLAGS_EXTRAS=-flimit-debug-info NO_LIMIT_DEBUG_INFO_FLAGS="" diff --git a/lldb/test/API/lang/cpp/namespace_definitions/Makefile b/lldb/test/API/lang/cpp/namespace_definitions/Makefile index fc9165f67f428..b17d70fc92871 100644 --- a/lldb/test/API/lang/cpp/namespace_definitions/Makefile +++ b/lldb/test/API/lang/cpp/namespace_definitions/Makefile @@ -6,10 +6,10 @@ a.out: liba libb include Makefile.rules liba: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_NAME=a DYLIB_CXX_SOURCES=a.cpp libb: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_NAME=b DYLIB_CXX_SOURCES=b.cpp diff --git a/lldb/test/API/lang/objc/conflicting-definition/Makefile b/lldb/test/API/lang/objc/conflicting-definition/Makefile index 00a0769a086f0..cba79c94d46ba 100644 --- a/lldb/test/API/lang/objc/conflicting-definition/Makefile +++ b/lldb/test/API/lang/objc/conflicting-definition/Makefile @@ -9,14 +9,14 @@ include Makefile.rules libTest.dylib: Test/Test.m mkdir -p Test - $(MAKE) MAKE_DSYM=YES -f $(MAKEFILE_RULES) \ + "$(MAKE)" MAKE_DSYM=YES -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_NAME=Test DYLIB_OBJC_SOURCES=Test/Test.m \ LD_EXTRAS="-lobjc -framework Foundation" \ CFLAGS_EXTRAS=-I$(SRCDIR) libTestExt.dylib: TestExt/TestExt.m mkdir -p TestExt - $(MAKE) MAKE_DSYM=YES -f $(MAKEFILE_RULES) \ + "$(MAKE)" MAKE_DSYM=YES -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_NAME=TestExt DYLIB_OBJC_SOURCES=TestExt/TestExt.m \ LD_EXTRAS="-lobjc -framework Foundation -lTest -L." \ CFLAGS_EXTRAS=-I$(SRCDIR) diff --git a/lldb/test/API/lang/objc/modules-hash-mismatch/Makefile b/lldb/test/API/lang/objc/modules-hash-mismatch/Makefile index 59bf009f68677..57da670b69ab3 100644 --- a/lldb/test/API/lang/objc/modules-hash-mismatch/Makefile +++ b/lldb/test/API/lang/objc/modules-hash-mismatch/Makefile @@ -5,7 +5,7 @@ USE_PRIVATE_MODULE_CACHE = YES .PHONY: update-module all: $(EXE) - $(MAKE) -f $(SRCDIR)/Makefile update-module + "$(MAKE)" -f $(SRCDIR)/Makefile update-module include Makefile.rules diff --git a/lldb/test/API/macosx/delay-init-dependency/Makefile b/lldb/test/API/macosx/delay-init-dependency/Makefile index 246ea0f34e1a1..7421c68b79baa 100644 --- a/lldb/test/API/macosx/delay-init-dependency/Makefile +++ b/lldb/test/API/macosx/delay-init-dependency/Makefile @@ -7,5 +7,5 @@ all: build-libfoo a.out include Makefile.rules build-libfoo: foo.c - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_C_SOURCES=foo.c DYLIB_NAME=foo DYLIB_ONLY=YES diff --git a/lldb/test/API/macosx/expedited-thread-pcs/Makefile b/lldb/test/API/macosx/expedited-thread-pcs/Makefile index 7799f06e77097..73a969831e673 100644 --- a/lldb/test/API/macosx/expedited-thread-pcs/Makefile +++ b/lldb/test/API/macosx/expedited-thread-pcs/Makefile @@ -6,6 +6,6 @@ all: build-libfoo a.out include Makefile.rules build-libfoo: foo.c - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_C_SOURCES=foo.c DYLIB_NAME=foo DYLIB_ONLY=YES diff --git a/lldb/test/API/macosx/indirect_symbol/Makefile b/lldb/test/API/macosx/indirect_symbol/Makefile index 9069302b39c4f..dee3e184fe19b 100644 --- a/lldb/test/API/macosx/indirect_symbol/Makefile +++ b/lldb/test/API/macosx/indirect_symbol/Makefile @@ -7,11 +7,11 @@ all: build-libindirect build-libreepxoprt a.out include Makefile.rules build-libindirect: indirect.c - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_C_SOURCES=indirect.c DYLIB_NAME=indirect DYLIB_ONLY=YES \ LD_EXTRAS="-Wl,-image_base,0x200000000" build-libreepxoprt: reexport.c - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_C_SOURCES=reexport.c DYLIB_NAME=reexport DYLIB_ONLY=YES \ LD_EXTRAS="-L. -lindirect -Wl,-alias_list,$(SRCDIR)/alias.list" diff --git a/lldb/test/API/macosx/lc-note/kern-ver-str/Makefile b/lldb/test/API/macosx/lc-note/kern-ver-str/Makefile index 05d9552a80209..01b4acfdcfd2a 100644 --- a/lldb/test/API/macosx/lc-note/kern-ver-str/Makefile +++ b/lldb/test/API/macosx/lc-note/kern-ver-str/Makefile @@ -5,7 +5,7 @@ C_SOURCES := main.c all: a.out create-empty-corefile create-empty-corefile: - $(MAKE) -f $(MAKEFILE_RULES) EXE=create-empty-corefile \ + "$(MAKE)" -f $(MAKEFILE_RULES) EXE=create-empty-corefile \ CXX=$(CC) CXX_SOURCES=create-empty-corefile.cpp include Makefile.rules diff --git a/lldb/test/API/macosx/lc-note/multiple-binary-corefile/Makefile b/lldb/test/API/macosx/lc-note/multiple-binary-corefile/Makefile index 8e561f17383fe..229235cda999f 100644 --- a/lldb/test/API/macosx/lc-note/multiple-binary-corefile/Makefile +++ b/lldb/test/API/macosx/lc-note/multiple-binary-corefile/Makefile @@ -10,11 +10,11 @@ create-empty-corefile: CXX_SOURCES=create-multibin-corefile.cpp libone.dylib: one.c - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_NAME=one DYLIB_C_SOURCES=one.c libtwo.dylib: two.c - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_NAME=two DYLIB_C_SOURCES=two.c include Makefile.rules diff --git a/lldb/test/API/macosx/macCatalystAppMacOSFramework/Makefile b/lldb/test/API/macosx/macCatalystAppMacOSFramework/Makefile index bb8df1869ef98..4d2ba1661ea30 100644 --- a/lldb/test/API/macosx/macCatalystAppMacOSFramework/Makefile +++ b/lldb/test/API/macosx/macCatalystAppMacOSFramework/Makefile @@ -9,7 +9,7 @@ override CC=xcrun clang all: libfoo.dylib a.out libfoo.dylib: foo.c - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_NAME=foo DYLIB_C_SOURCES=foo.c include Makefile.rules diff --git a/lldb/test/API/macosx/skinny-corefile/Makefile b/lldb/test/API/macosx/skinny-corefile/Makefile index efe37f3d2b8b2..fce43a36c33ac 100644 --- a/lldb/test/API/macosx/skinny-corefile/Makefile +++ b/lldb/test/API/macosx/skinny-corefile/Makefile @@ -6,10 +6,10 @@ include Makefile.rules a.out: libto-be-removed libpresent libto-be-removed: libpresent - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_C_SOURCES=to-be-removed.c DYLIB_NAME=to-be-removed \ LD_EXTRAS="-L. -lpresent" libpresent: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_C_SOURCES=present.c DYLIB_NAME=present diff --git a/lldb/test/API/tools/lldb-dap/breakpoint/Makefile b/lldb/test/API/tools/lldb-dap/breakpoint/Makefile index 30a6400184933..7634f513e8523 100644 --- a/lldb/test/API/tools/lldb-dap/breakpoint/Makefile +++ b/lldb/test/API/tools/lldb-dap/breakpoint/Makefile @@ -15,5 +15,5 @@ main-copy.cpp: main.cpp # The following shared library will be used to test breakpoints under dynamic loading libother: other-copy.c - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES DYLIB_C_SOURCES=other-copy.c DYLIB_NAME=other diff --git a/lldb/test/API/tools/lldb-server/libraries-svr4/Makefile b/lldb/test/API/tools/lldb-server/libraries-svr4/Makefile index 5b5c1dcef783a..f13b1ac15928a 100644 --- a/lldb/test/API/tools/lldb-server/libraries-svr4/Makefile +++ b/lldb/test/API/tools/lldb-server/libraries-svr4/Makefile @@ -9,11 +9,11 @@ a.out: svr4lib_a svr4lib_b_quote include Makefile.rules svr4lib_a: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_NAME=svr4lib_a DYLIB_CXX_SOURCES=svr4lib_a.cpp \ DYLIB_ONLY=YES svr4lib_b_quote: - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_NAME=svr4lib_b\\\" DYLIB_CXX_SOURCES=svr4lib_b_quote.cpp \ DYLIB_ONLY=YES From 977780e31fb0c512dedd503e67ed5d5c2f38d80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Tue, 15 Oct 2024 15:43:15 +0200 Subject: [PATCH 07/15] [lldb] Support even more swiftlang tests with nested make invocations on Windows (#9428) --- lldb/test/API/lang/swift/clashing_abi_name/Makefile | 4 ++-- .../API/lang/swift/expression/error_missing_type/Makefile | 2 +- lldb/test/API/lang/swift/import_spi/Makefile | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lldb/test/API/lang/swift/clashing_abi_name/Makefile b/lldb/test/API/lang/swift/clashing_abi_name/Makefile index 2237cdac0c039..553b52a209b66 100644 --- a/lldb/test/API/lang/swift/clashing_abi_name/Makefile +++ b/lldb/test/API/lang/swift/clashing_abi_name/Makefile @@ -7,11 +7,11 @@ all: libLibrary.dylib a.out include Makefile.rules libLibrary.dylib: Library.swift - $(MAKE) MAKE_DSYM=YES CC=$(CC) SWIFTC=$(SWIFTC) \ + "$(MAKE)" MAKE_DSYM=YES CC=$(CC) SWIFTC=$(SWIFTC) \ ARCH=$(ARCH) DSYMUTIL=$(DSYMUTIL) \ BASENAME=Library \ SWIFTFLAGS_EXTRAS="-I$(BUILDDIR) -enable-library-evolution -emit-library -emit-module -parse-as-library -module-abi-name a" \ VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/dylib.mk all clean:: - $(MAKE) BASENAME=Library VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/dylib.mk clean + "$(MAKE)" BASENAME=Library VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/dylib.mk clean diff --git a/lldb/test/API/lang/swift/expression/error_missing_type/Makefile b/lldb/test/API/lang/swift/expression/error_missing_type/Makefile index 8272b2ffbc43a..1879c567ae9aa 100644 --- a/lldb/test/API/lang/swift/expression/error_missing_type/Makefile +++ b/lldb/test/API/lang/swift/expression/error_missing_type/Makefile @@ -4,7 +4,7 @@ LD_EXTRAS = -lLibrary -L$(BUILDDIR) all: libLibrary.dylib a.out lib%.dylib: %.swift - $(MAKE) MAKE_DSYM=NO DYLIB_ONLY=YES \ + "$(MAKE)" MAKE_DSYM=NO DYLIB_ONLY=YES \ DYLIB_HIDE_SWIFTMODULE=YES \ DYLIB_NAME=$(shell basename $< .swift) \ DYLIB_SWIFT_SOURCES=$(shell basename $<) \ diff --git a/lldb/test/API/lang/swift/import_spi/Makefile b/lldb/test/API/lang/swift/import_spi/Makefile index 7bb7fa25c1aeb..325be6e6885c6 100644 --- a/lldb/test/API/lang/swift/import_spi/Makefile +++ b/lldb/test/API/lang/swift/import_spi/Makefile @@ -8,7 +8,7 @@ all: A.swiftmodule $(EXE) include Makefile.rules A.swiftmodule: $(SRCDIR)/A.swift B.swiftmodule - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES \ DYLIB_NAME=A \ DYLIB_SWIFT_SOURCES=A.swift \ @@ -17,7 +17,7 @@ A.swiftmodule: $(SRCDIR)/A.swift B.swiftmodule LD_EXTRAS="-L$(BUILDDIR) -lB" B.swiftmodule: $(SRCDIR)/B.swift - $(MAKE) -f $(MAKEFILE_RULES) \ + "$(MAKE)" -f $(MAKEFILE_RULES) \ DYLIB_ONLY=YES \ DYLIB_NAME=B \ DYLIB_SWIFT_SOURCES=B.swift \ From 7302c510d6154bcdf0c5b4b8111920226f801c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Mon, 14 Oct 2024 15:33:49 +0200 Subject: [PATCH 08/15] [lldb][test] Propagate SDKROOT env var in Shell tests on Windows We need the manual lookup in lldb/source/Host/windows/HostInfoWindowsSwift.cpp to succeed. Otherwise SwiftASTContext::CreateInstance() fails with: Cannot create Swift scratch context (couldn't load the Swift stdlib) --- lldb/test/Shell/helper/toolchain.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lldb/test/Shell/helper/toolchain.py b/lldb/test/Shell/helper/toolchain.py index d9702f21641b6..66f7d33e7de9e 100644 --- a/lldb/test/Shell/helper/toolchain.py +++ b/lldb/test/Shell/helper/toolchain.py @@ -149,7 +149,16 @@ def use_support_substitutions(config): sdk_path = lit.util.to_string(out) llvm_config.lit_config.note("using SDKROOT: %r" % sdk_path) host_flags += ["-isysroot", sdk_path] - elif sys.platform != "win32": + elif sys.platform == "win32": + # Required in SwiftREPL tests + sdk_path = os.environ.get("SDKROOT") + if sdk_path: + llvm_config.lit_config.note(f"using SDKROOT: {sdk_path}") + llvm_config.with_environment("SDKROOT", sdk_path) + else: + llvm_config.lit_config.warning( + "mandatory environment variable not found: SDKROOT") + else: host_flags += ["-pthread"] config.target_shared_library_suffix = ( From 6c8125369520279dcd0670f4c6822c7b2826bc07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Tue, 15 Oct 2024 13:15:19 +0200 Subject: [PATCH 09/15] [lldb][swift] Check runtime dependencies of SwiftREPL tests in local lit config These binaries only exists if the Swift runtime was built correctly. We cannot check them at configuration time, because they might not exist yet. --- lldb/test/Shell/SwiftREPL/lit.local.cfg | 11 +++++++++++ lldb/test/Shell/lit.site.cfg.py.in | 1 + 2 files changed, 12 insertions(+) diff --git a/lldb/test/Shell/SwiftREPL/lit.local.cfg b/lldb/test/Shell/SwiftREPL/lit.local.cfg index 29d485ea63774..539418112b925 100644 --- a/lldb/test/Shell/SwiftREPL/lit.local.cfg +++ b/lldb/test/Shell/SwiftREPL/lit.local.cfg @@ -2,3 +2,14 @@ config.suffixes = ['.test'] if 'lldb-repro' in config.available_features: config.unsupported = True + +def check_exists(path): + import os + if not os.path.isfile(path): + lit_config.warning(f"Runtime dependency not found: {path}") + +# Check runtime dependencies for SwiftREPL tests on Windows +if sys.platform == "win32": + host_arch = config.host_triple.split("-")[0] + check_exists(f"{config.swift_libs_dir}/windows/{host_arch}/swiftrt.obj") + check_exists(f"{config.llvm_shlib_dir}/swiftCore.dll") diff --git a/lldb/test/Shell/lit.site.cfg.py.in b/lldb/test/Shell/lit.site.cfg.py.in index 5e4e2676219f3..d0b8a6be6f9cd 100644 --- a/lldb/test/Shell/lit.site.cfg.py.in +++ b/lldb/test/Shell/lit.site.cfg.py.in @@ -17,6 +17,7 @@ config.cmake_sysroot = lit_config.substitute("@CMAKE_SYSROOT@") config.target_triple = "@LLVM_TARGET_TRIPLE@" config.python_executable = "@Python3_EXECUTABLE@" config.swiftc = "@LLDB_SWIFTC@" +config.swift_libs_dir = '@LLDB_SWIFT_LIBS@' config.lldb_enable_swift = @LLDB_ENABLE_SWIFT_SUPPORT@ config.have_zlib = @LLVM_ENABLE_ZLIB@ config.objc_gnustep_dir = "@LLDB_TEST_OBJC_GNUSTEP_DIR@" From a6470fccaee4ef0f64ef07f903578df47fde4230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Thu, 7 Nov 2024 14:26:44 +0100 Subject: [PATCH 10/15] [lldb] Relax check for breakpoint site in Unwind/windows-unaligned-x86_64.test --- lldb/test/Shell/Unwind/windows-unaligned-x86_64.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/test/Shell/Unwind/windows-unaligned-x86_64.test b/lldb/test/Shell/Unwind/windows-unaligned-x86_64.test index 94f1c011ebd2a..0356960424328 100644 --- a/lldb/test/Shell/Unwind/windows-unaligned-x86_64.test +++ b/lldb/test/Shell/Unwind/windows-unaligned-x86_64.test @@ -17,7 +17,7 @@ breakpoint set -n func # CHECK: Breakpoint 1: where = {{.*}}`{{(::)?}}func process launch -# CHECK: stop reason = breakpoint 1.1 +# CHECK: stop reason = breakpoint 1 thread backtrace # CHECK: frame #0: {{.*}}`{{(::)?}}func From 95a0beef1956e252ec7bcc13c7819af9bc4bb70b Mon Sep 17 00:00:00 2001 From: Muhammad Omair Javaid Date: Wed, 16 Oct 2024 05:30:50 +0500 Subject: [PATCH 11/15] [lldb] Fix command-expr-diagnostics.test for Windows (#112109) This adds a minor change to command-expr-diagnostics.test to make it pass on windows. Clang produces PDB on windows by default which was ignoring main symbol due to optimization. The problem is fixed by adding -gdwarf to commandline, making sure dwarf debug info gets generated on both Windows and Linux. --- lldb/test/Shell/Commands/command-expr-diagnostics.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/test/Shell/Commands/command-expr-diagnostics.test b/lldb/test/Shell/Commands/command-expr-diagnostics.test index b242dba1980f0..3dab204ca87d1 100644 --- a/lldb/test/Shell/Commands/command-expr-diagnostics.test +++ b/lldb/test/Shell/Commands/command-expr-diagnostics.test @@ -17,7 +17,7 @@ # CHECK3: {{^ error: use of undeclared identifier 'a'}} # RUN: echo "int main(){return 0;}">%t.c -# RUN: %clang_host %t.c -o %t.exe +# RUN: %clang_host %t.c -gdwarf -o %t.exe # RUN: echo quit | %lldb %t.exe -o "b main" -o r -o \ # RUN: "expr --top-level -- template T FOO(T x) { return x/2;}" -o \ # RUN: "expression -- FOO(\"\")" 2>&1 | FileCheck %s --check-prefix=CHECK4 From 85fb0df3612e4f130baa58c6b31bd86140149a44 Mon Sep 17 00:00:00 2001 From: Muhammad Omair Javaid Date: Wed, 16 Oct 2024 06:05:30 +0500 Subject: [PATCH 12/15] Revert "[lldb] Fix command-expr-diagnostics.test for Windows (#112109)" This reverts commit eca3206d29e7ce97dd6336deaa3da96be37f8277. This broke LLDB Linux bot for no apparent reason. I ll post a more suitable fix later. Disabled command-expr-diagnostics.test on windows for now. --- lldb/test/Shell/Commands/command-expr-diagnostics.test | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lldb/test/Shell/Commands/command-expr-diagnostics.test b/lldb/test/Shell/Commands/command-expr-diagnostics.test index 3dab204ca87d1..72df47bbbdc1e 100644 --- a/lldb/test/Shell/Commands/command-expr-diagnostics.test +++ b/lldb/test/Shell/Commands/command-expr-diagnostics.test @@ -1,3 +1,4 @@ +# XFAIL: system-windows # RUN: echo quit | %lldb -o "expression a+b" \ # RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK1 # (lldb) expression a+b @@ -17,7 +18,7 @@ # CHECK3: {{^ error: use of undeclared identifier 'a'}} # RUN: echo "int main(){return 0;}">%t.c -# RUN: %clang_host %t.c -gdwarf -o %t.exe +# RUN: %clang_host %t.c -o %t.exe # RUN: echo quit | %lldb %t.exe -o "b main" -o r -o \ # RUN: "expr --top-level -- template T FOO(T x) { return x/2;}" -o \ # RUN: "expression -- FOO(\"\")" 2>&1 | FileCheck %s --check-prefix=CHECK4 From af014c94c4a900952c7a697adf56e092ffe81b98 Mon Sep 17 00:00:00 2001 From: Vladislav Dzhidzhoev Date: Tue, 12 Nov 2024 18:03:24 +0100 Subject: [PATCH 13/15] [lldb][test] Fix remote Shell tests failures on Windows host (#115716) Since the remote Shell test execution feature was added, these tests should now be disabled on Windows target instead of Windows host. It should fix failures on https://lab.llvm.org/staging/#/builders/197/builds/76. --- lldb/test/Shell/Commands/command-disassemble-mixed.c | 2 +- lldb/test/Shell/Commands/command-expr-diagnostics.test | 2 +- .../test/Shell/Commands/command-target-create-resolve-exe.test | 2 +- lldb/test/Shell/Expr/TestAnonNamespaceParamFunc.cpp | 2 +- lldb/test/Shell/Expr/TestIRMemoryMapWindows.test | 2 +- lldb/test/Shell/Process/Windows/exception_access_violation.cpp | 2 +- lldb/test/Shell/Process/Windows/process_load.cpp | 2 +- lldb/test/Shell/SymbolFile/DWARF/packed.cpp | 2 +- lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp | 2 +- lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp | 2 +- lldb/test/Shell/SymbolFile/PDB/calling-conventions-arm.test | 2 +- lldb/test/Shell/SymbolFile/PDB/class-layout.test | 2 +- lldb/test/Shell/SymbolFile/PDB/compilands.test | 2 +- lldb/test/Shell/SymbolFile/PDB/expressions.test | 2 +- lldb/test/Shell/SymbolFile/PDB/func-symbols.test | 2 +- lldb/test/Shell/SymbolFile/PDB/function-level-linking.test | 2 +- lldb/test/Shell/SymbolFile/PDB/pointers.test | 2 +- lldb/test/Shell/SymbolFile/PDB/type-quals.test | 2 +- lldb/test/Shell/SymbolFile/PDB/udt-layout.test | 2 +- lldb/test/Shell/SymbolFile/PDB/variables-locations.test | 2 +- lldb/test/Shell/SymbolFile/PDB/vbases.test | 2 +- lldb/test/Shell/Target/dependent-modules-nodupe-windows.test | 2 +- lldb/test/Shell/lit.cfg.py | 3 +++ 23 files changed, 25 insertions(+), 22 deletions(-) diff --git a/lldb/test/Shell/Commands/command-disassemble-mixed.c b/lldb/test/Shell/Commands/command-disassemble-mixed.c index 1e530095c5c56..4af85c0a4c020 100644 --- a/lldb/test/Shell/Commands/command-disassemble-mixed.c +++ b/lldb/test/Shell/Commands/command-disassemble-mixed.c @@ -1,6 +1,6 @@ // invalid mixed disassembly line -// XFAIL: system-windows +// XFAIL: target-windows // RUN: %clang_host -g %s -o %t // RUN: %lldb %t -o "dis -m -n main" -o "exit" | FileCheck %s diff --git a/lldb/test/Shell/Commands/command-expr-diagnostics.test b/lldb/test/Shell/Commands/command-expr-diagnostics.test index 72df47bbbdc1e..3c827fb4516ec 100644 --- a/lldb/test/Shell/Commands/command-expr-diagnostics.test +++ b/lldb/test/Shell/Commands/command-expr-diagnostics.test @@ -1,4 +1,4 @@ -# XFAIL: system-windows +# XFAIL: target-windows # RUN: echo quit | %lldb -o "expression a+b" \ # RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK1 # (lldb) expression a+b diff --git a/lldb/test/Shell/Commands/command-target-create-resolve-exe.test b/lldb/test/Shell/Commands/command-target-create-resolve-exe.test index 0ebbaf25e652d..3a0c7bd91a73e 100644 --- a/lldb/test/Shell/Commands/command-target-create-resolve-exe.test +++ b/lldb/test/Shell/Commands/command-target-create-resolve-exe.test @@ -1,4 +1,4 @@ -# REQUIRES: system-windows +# REQUIRES: target-windows ## This checks that when starting lldb (or using `target create`) with a ## program name which is on $PATH, or not specify the .exe suffix of a program diff --git a/lldb/test/Shell/Expr/TestAnonNamespaceParamFunc.cpp b/lldb/test/Shell/Expr/TestAnonNamespaceParamFunc.cpp index 3d7b193dc6aac..725b2d637637f 100644 --- a/lldb/test/Shell/Expr/TestAnonNamespaceParamFunc.cpp +++ b/lldb/test/Shell/Expr/TestAnonNamespaceParamFunc.cpp @@ -3,7 +3,7 @@ // linkage. In this case, a function whose argument // is not legally usable outside this TU. -// XFAIL: system-windows +// XFAIL: target-windows // RUN: %build %s -o %t // RUN: %lldb %t -o run -o "expression func(a)" -o exit | FileCheck %s diff --git a/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test b/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test index ae29492c9ccc9..66f0bce304730 100644 --- a/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test +++ b/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test @@ -1,4 +1,4 @@ -# REQUIRES: system-windows +# REQUIRES: target-windows # RUN: %clang_cl_host /Zi /GS- %p/Inputs/call-function.cpp /c /o %t.obj # RUN: %msvc_link /debug:full %t.obj /out:%t diff --git a/lldb/test/Shell/Process/Windows/exception_access_violation.cpp b/lldb/test/Shell/Process/Windows/exception_access_violation.cpp index 4835b498ee4df..93898a1991bc6 100644 --- a/lldb/test/Shell/Process/Windows/exception_access_violation.cpp +++ b/lldb/test/Shell/Process/Windows/exception_access_violation.cpp @@ -1,6 +1,6 @@ // clang-format off -// REQUIRES: system-windows +// REQUIRES: target-windows // RUN: %build --compiler=clang-cl -o %t.exe -- %s // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "run" -- write | FileCheck --check-prefix=WRITE %s // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "run" -- read | FileCheck --check-prefix=READ %s diff --git a/lldb/test/Shell/Process/Windows/process_load.cpp b/lldb/test/Shell/Process/Windows/process_load.cpp index 43bf45865f9ba..de3b4afc77f87 100644 --- a/lldb/test/Shell/Process/Windows/process_load.cpp +++ b/lldb/test/Shell/Process/Windows/process_load.cpp @@ -1,6 +1,6 @@ // clang-format off -// REQUIRES: system-windows +// REQUIRES: target-windows // RUN: %build --compiler=clang-cl -o %t.exe -- %s // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -o "b main" -o "process launch" -o "process load kernel32.dll" | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/DWARF/packed.cpp b/lldb/test/Shell/SymbolFile/DWARF/packed.cpp index 56a4308ff7c5e..6a794a012a6e5 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/packed.cpp +++ b/lldb/test/Shell/SymbolFile/DWARF/packed.cpp @@ -1,4 +1,4 @@ -// XFAIL: system-windows +// XFAIL: target-windows // RUN: %clangxx_host -gdwarf -o %t %s // RUN: %lldb %t \ // RUN: -o "expr alignof(packed)" \ diff --git a/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp b/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp index 9aa25adf6bcc7..df6ad8c306597 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp @@ -1,6 +1,6 @@ // clang-format off -// REQUIRES: system-windows +// REQUIRES: target-windows // RUN: %build -o %t.exe -- %s // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/local-variables.lldbinit 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp b/lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp index e96e3ed6a0107..d1b9c6dba3ca3 100644 --- a/lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp +++ b/lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp @@ -1,5 +1,5 @@ // clang-format off -// REQUIRES: lld, system-windows +// REQUIRES: lld, target-windows // RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ diff --git a/lldb/test/Shell/SymbolFile/PDB/calling-conventions-arm.test b/lldb/test/Shell/SymbolFile/PDB/calling-conventions-arm.test index 07dc89d460293..7dabf9157d47e 100644 --- a/lldb/test/Shell/SymbolFile/PDB/calling-conventions-arm.test +++ b/lldb/test/Shell/SymbolFile/PDB/calling-conventions-arm.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, lld, (target-arm || target-aarch64) +REQUIRES: target-windows, lld, (target-arm || target-aarch64) RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%t.exe %S/Inputs/CallingConventionsTest.cpp RUN: %build --compiler=clang-cl --arch=64 --nodefaultlib --output=%t.exe %S/Inputs/CallingConventionsTest.cpp RUN: lldb-test symbols -dump-ast %t.exe | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/PDB/class-layout.test b/lldb/test/Shell/SymbolFile/PDB/class-layout.test index c99a180f4f632..efd52b8876ce0 100644 --- a/lldb/test/Shell/SymbolFile/PDB/class-layout.test +++ b/lldb/test/Shell/SymbolFile/PDB/class-layout.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, msvc +REQUIRES: target-windows, msvc RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/ClassLayoutTest.cpp.obj %S/Inputs/ClassLayoutTest.cpp RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/ClassLayoutTest.cpp.exe %T/ClassLayoutTest.cpp.obj RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/PDB/compilands.test b/lldb/test/Shell/SymbolFile/PDB/compilands.test index ecee5eb50d399..1847d8d88b266 100644 --- a/lldb/test/Shell/SymbolFile/PDB/compilands.test +++ b/lldb/test/Shell/SymbolFile/PDB/compilands.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, msvc +REQUIRES: target-windows, msvc RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/CompilandsTest.cpp.obj %S/Inputs/CompilandsTest.cpp RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/CompilandsTest.cpp.exe %T/CompilandsTest.cpp.obj RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols %T/CompilandsTest.cpp.exe | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/PDB/expressions.test b/lldb/test/Shell/SymbolFile/PDB/expressions.test index 89d7c94e7aa06..1932be74ca878 100644 --- a/lldb/test/Shell/SymbolFile/PDB/expressions.test +++ b/lldb/test/Shell/SymbolFile/PDB/expressions.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, msvc +REQUIRES: target-windows, msvc RUN: %build --compiler=msvc --nodefaultlib --output=%t.exe %S/Inputs/ExpressionsTest.cpp RUN: not %lldb -b -s %S/Inputs/ExpressionsTest0.script -s %S/Inputs/ExpressionsTest1.script -s %S/Inputs/ExpressionsTest2.script -- %t.exe 2>&1 | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/PDB/func-symbols.test b/lldb/test/Shell/SymbolFile/PDB/func-symbols.test index 5990952938e67..95e0dd5eb078e 100644 --- a/lldb/test/Shell/SymbolFile/PDB/func-symbols.test +++ b/lldb/test/Shell/SymbolFile/PDB/func-symbols.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, lld +REQUIRES: target-windows, lld RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%T/FuncSymbolsTest.exe %S/Inputs/FuncSymbolsTestMain.cpp %S/Inputs/FuncSymbols.cpp RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-ONE %s RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-TWO %s diff --git a/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test b/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test index ec0ef57440070..56343cdbd75bd 100644 --- a/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test +++ b/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, lld +REQUIRES: target-windows, lld RUN: %clang_cl_host /c /Zi /Gy %S/Inputs/FunctionLevelLinkingTest.cpp /o %t.obj RUN: lld-link /debug:full /nodefaultlib /entry:main /order:@%S/Inputs/FunctionLevelLinkingTest.ord %t.obj /out:%t.exe RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols -verify %t.exe diff --git a/lldb/test/Shell/SymbolFile/PDB/pointers.test b/lldb/test/Shell/SymbolFile/PDB/pointers.test index a3e6f557fed6f..355b5fa16839a 100644 --- a/lldb/test/Shell/SymbolFile/PDB/pointers.test +++ b/lldb/test/Shell/SymbolFile/PDB/pointers.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, msvc +REQUIRES: target-windows, msvc RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/PointerTypeTest.cpp.obj %S/Inputs/PointerTypeTest.cpp RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/PointerTypeTest.cpp.exe %T/PointerTypeTest.cpp.obj RUN: lldb-test symbols %T/PointerTypeTest.cpp.exe | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/PDB/type-quals.test b/lldb/test/Shell/SymbolFile/PDB/type-quals.test index cf65c79223b23..982bb70f3c6c5 100644 --- a/lldb/test/Shell/SymbolFile/PDB/type-quals.test +++ b/lldb/test/Shell/SymbolFile/PDB/type-quals.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, msvc +REQUIRES: target-windows, msvc RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/TypeQualsTest.cpp.obj %S/Inputs/TypeQualsTest.cpp RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/TypeQualsTest.cpp.exe %T/TypeQualsTest.cpp.obj RUN: lldb-test symbols %T/TypeQualsTest.cpp.exe | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/PDB/udt-layout.test b/lldb/test/Shell/SymbolFile/PDB/udt-layout.test index 84414cbf8440d..bc68539e25ec1 100644 --- a/lldb/test/Shell/SymbolFile/PDB/udt-layout.test +++ b/lldb/test/Shell/SymbolFile/PDB/udt-layout.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, lld +REQUIRES: target-windows, lld RUN: %build --compiler=clang-cl --output=%t.exe %S/Inputs/UdtLayoutTest.cpp RUN: %lldb -b -s %S/Inputs/UdtLayoutTest.script -- %t.exe | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/PDB/variables-locations.test b/lldb/test/Shell/SymbolFile/PDB/variables-locations.test index b5bfc6fe81af9..f8ba4f25ca96f 100644 --- a/lldb/test/Shell/SymbolFile/PDB/variables-locations.test +++ b/lldb/test/Shell/SymbolFile/PDB/variables-locations.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, lld +REQUIRES: target-windows, lld RUN: %build --compiler=clang-cl --output=%t.exe %S/Inputs/VariablesLocationsTest.cpp RUN: env LLDB_USE_NATIVE_PDB_READER=0 %lldb -b -s %S/Inputs/VariablesLocationsTest.script -- %t.exe | FileCheck %s RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -b -s %S/Inputs/VariablesLocationsTest.script -- %t.exe | FileCheck %s diff --git a/lldb/test/Shell/SymbolFile/PDB/vbases.test b/lldb/test/Shell/SymbolFile/PDB/vbases.test index 57239e07c87d6..b58e3edc3cc80 100644 --- a/lldb/test/Shell/SymbolFile/PDB/vbases.test +++ b/lldb/test/Shell/SymbolFile/PDB/vbases.test @@ -1,4 +1,4 @@ -REQUIRES: system-windows, lld +REQUIRES: target-windows, lld RUN: %build --compiler=clang-cl --output=%t.exe %S/Inputs/VBases.cpp RUN: %lldb -b -s %S/Inputs/VBases.script -- %t.exe | FileCheck %s diff --git a/lldb/test/Shell/Target/dependent-modules-nodupe-windows.test b/lldb/test/Shell/Target/dependent-modules-nodupe-windows.test index 52e46cd0c9b21..78d7f7469b9f8 100644 --- a/lldb/test/Shell/Target/dependent-modules-nodupe-windows.test +++ b/lldb/test/Shell/Target/dependent-modules-nodupe-windows.test @@ -1,4 +1,4 @@ -# REQUIRES: system-windows +# REQUIRES: target-windows # Checks that dependent modules preloaded by LLDB are not duplicated when the # process actually loads the DLL. diff --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py index 223612ba205b4..860a755dff100 100644 --- a/lldb/test/Shell/lit.cfg.py +++ b/lldb/test/Shell/lit.cfg.py @@ -87,6 +87,9 @@ if re.match(r"^arm(hf.*-linux)|(.*-linux-gnuabihf)", config.target_triple): config.available_features.add("armhf-linux") +if re.match(r".*-(windows|mingw32)", config.target_triple): + config.available_features.add("target-windows") + if re.match(r".*-(windows-msvc)$", config.target_triple): config.available_features.add("windows-msvc") From 10fef7fcdc00d303cf804d7fde2437913dbda8d2 Mon Sep 17 00:00:00 2001 From: Vladislav Dzhidzhoev Date: Fri, 26 Jul 2024 14:28:11 +0200 Subject: [PATCH 14/15] [LLDB] Remove decorator from XPASSes x86/Windows (#100628) This patch removes XFAIL decorators from tests that are passing on x86 Windows. Corresponding XFAILs for AArch64 were removed here 7daa9a9b40a22. --- .../TestClassTemplateNonTypeParameterPack.py | 3 --- .../TestClassTemplateTypeParameterPack.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/lldb/test/API/lang/cpp/class-template-non-type-parameter-pack/TestClassTemplateNonTypeParameterPack.py b/lldb/test/API/lang/cpp/class-template-non-type-parameter-pack/TestClassTemplateNonTypeParameterPack.py index 9e484e0132c83..730537da2fccf 100644 --- a/lldb/test/API/lang/cpp/class-template-non-type-parameter-pack/TestClassTemplateNonTypeParameterPack.py +++ b/lldb/test/API/lang/cpp/class-template-non-type-parameter-pack/TestClassTemplateNonTypeParameterPack.py @@ -5,9 +5,6 @@ class TestCaseClassTemplateNonTypeParameterPack(TestBase): - @expectedFailureAll( - oslist=["windows"], archs=["i[3-6]86", "x86_64"] - ) # Fails to read memory from target. @no_debug_info_test def test(self): self.build() diff --git a/lldb/test/API/lang/cpp/class-template-type-parameter-pack/TestClassTemplateTypeParameterPack.py b/lldb/test/API/lang/cpp/class-template-type-parameter-pack/TestClassTemplateTypeParameterPack.py index 102c00dc603df..1ed643e6dd85c 100644 --- a/lldb/test/API/lang/cpp/class-template-type-parameter-pack/TestClassTemplateTypeParameterPack.py +++ b/lldb/test/API/lang/cpp/class-template-type-parameter-pack/TestClassTemplateTypeParameterPack.py @@ -5,9 +5,6 @@ class TestCaseClassTemplateTypeParameterPack(TestBase): - @expectedFailureAll( - oslist=["windows"], archs=["i[3-6]86", "x86_64"] - ) # Fails to read memory from target. @no_debug_info_test def test(self): self.build() From 0da07d6dfdc5f71567d59dbce748b44f83bb088a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Wed, 23 Oct 2024 14:25:14 +0200 Subject: [PATCH 15/15] [lldb][CMake] If make isn't found, print a warning but don't error out (#111531) Bot maintainers should be aware and it became too much of a burden for developers. In particular on Windows, where make.exe won't be found in Path typically. --- lldb/test/API/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt index 1d084be06bee8..30a9b776fc3c4 100644 --- a/lldb/test/API/CMakeLists.txt +++ b/lldb/test/API/CMakeLists.txt @@ -73,9 +73,9 @@ else() message(STATUS "Found make: ${LLDB_DEFAULT_TEST_MAKE}") else() message(STATUS "Not found: make") - message(SEND_ERROR - "LLDB tests require 'make' tool. Please pass via `LLDB_TEST_MAKE` " - "(or otherwise disable tests with `LLDB_INCLUDE_TESTS=OFF`)") + message(WARNING + "Many LLDB API tests require 'make' tool. Please provide it in Path " + "or pass via LLDB_TEST_MAKE.") endif() endif()