[clang] [llvm] bunch of small changes to fix a number of LIT tests on z/OS (PR #165567)
Sean Perry via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 29 06:55:14 PDT 2025
https://github.com/perry-ca created https://github.com/llvm/llvm-project/pull/165567
A collection of small changes to get a number of lit tests working on z/OS.
>From c5710aee52aebaff035f2ccf43e089602c166b04 Mon Sep 17 00:00:00 2001
From: Sean Perry <perry at ca.ibm.com>
Date: Wed, 29 Oct 2025 09:52:55 -0400
Subject: [PATCH] bunch of small changes to fix a number of LIT tests on z/OS
---
clang/lib/Driver/ToolChains/ZOS.cpp | 4 ++--
clang/test/CodeGenCXX/ubsan-coroutines.cpp | 1 +
clang/test/Driver/fat-archive-unbundle-ext.c | 2 +-
clang/test/Headers/cuda_with_openmp.cu | 2 +-
llvm/test/lit.cfg.py | 3 ++-
5 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/ZOS.cpp b/clang/lib/Driver/ToolChains/ZOS.cpp
index 57bcb3c306cef..9a3c45323a3cf 100644
--- a/clang/lib/Driver/ToolChains/ZOS.cpp
+++ b/clang/lib/Driver/ToolChains/ZOS.cpp
@@ -75,7 +75,7 @@ void zos::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("as"));
C.addCommand(std::make_unique<Command>(JA, *this, ResponseFileSupport::None(),
- Exec, CmdArgs, Inputs));
+ Exec, CmdArgs, Inputs, Output));
}
static std::string getLEHLQ(const ArgList &Args) {
@@ -213,7 +213,7 @@ void zos::Linker::ConstructJob(Compilation &C, const JobAction &JA,
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
C.addCommand(std::make_unique<Command>(JA, *this, ResponseFileSupport::None(),
- Exec, CmdArgs, Inputs));
+ Exec, CmdArgs, Inputs, Output));
}
ToolChain::RuntimeLibType ZOS::GetDefaultRuntimeLibType() const {
diff --git a/clang/test/CodeGenCXX/ubsan-coroutines.cpp b/clang/test/CodeGenCXX/ubsan-coroutines.cpp
index 04ab0505f1401..60c89a47f9046 100644
--- a/clang/test/CodeGenCXX/ubsan-coroutines.cpp
+++ b/clang/test/CodeGenCXX/ubsan-coroutines.cpp
@@ -1,6 +1,7 @@
// This test merely verifies that emitting the object file does not cause a
// crash when the LLVM coroutines passes are run.
// RUN: %clang_cc1 -emit-obj -std=c++2a -fsanitize=null %s -o %t.o
+// UNSUPPORTED: target={{.*}}-zos{{.*}}
namespace std {
template <typename R, typename... T> struct coroutine_traits {
diff --git a/clang/test/Driver/fat-archive-unbundle-ext.c b/clang/test/Driver/fat-archive-unbundle-ext.c
index e797acccf02b4..d658ad05b345c 100644
--- a/clang/test/Driver/fat-archive-unbundle-ext.c
+++ b/clang/test/Driver/fat-archive-unbundle-ext.c
@@ -1,5 +1,5 @@
// REQUIRES: x86-registered-target
-// UNSUPPORTED: target={{.*-windows.*}}, target={{.*}}-macosx{{.*}}, target={{.*-darwin.*}}, target={{.*}}-aix{{.*}}
+// UNSUPPORTED: target={{.*-windows.*}}, target={{.*}}-macosx{{.*}}, target={{.*-darwin.*}}, target={{.*}}-aix{{.*}}, target={{.*}}-zos{{.*}}
// Generate dummy fat object
// RUN: %clang -O0 --target=%itanium_abi_triple %s -c -o %t.host.o
diff --git a/clang/test/Headers/cuda_with_openmp.cu b/clang/test/Headers/cuda_with_openmp.cu
index efde4ecdc6626..8ea0de5972ff2 100644
--- a/clang/test/Headers/cuda_with_openmp.cu
+++ b/clang/test/Headers/cuda_with_openmp.cu
@@ -2,7 +2,7 @@
// Reported in https://bugs.llvm.org/show_bug.cgi?id=48014
///==========================================================================///
-// REQUIRES: nvptx-registered-target
+// REQUIRES: nvptx-registered-target, host-supports-cuda
// RUN: %clang -x cuda -fopenmp -c %s -o - --cuda-path=%S/../Driver/Inputs/CUDA/usr/local/cuda -nocudalib -isystem %S/Inputs/include -isystem %S/../../lib/Headers -fsyntax-only
diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index 781240aac94b6..785b1b8a32c0c 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -756,7 +756,8 @@ def host_unwind_supports_jit():
if not re.match(
r"^(x86_64|aarch64|arm64|powerpc|powerpc64).*-(windows-cygnus|windows-gnu|windows-msvc|aix)",
config.target_triple,
-) and not re.match(r"^arm64(e)?-apple-(macos|darwin)", config.target_triple):
+) and not re.match(r"^arm64(e)?-apple-(macos|darwin)", config.target_triple,
+) and not re.match(r".*-zos.*", config.target_triple):
config.available_features.add("debug_frame")
if config.enable_backtrace:
More information about the llvm-commits
mailing list