[llvm-branch-commits] [clang] clang/HIP: Remove REQUIRES windows from a test (PR #112411)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Oct 16 06:59:52 PDT 2024


https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/112411

>From ecb52547f59aae09e36f7f80a3171d7c1a2de16f Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Tue, 15 Oct 2024 22:01:28 +0400
Subject: [PATCH 1/3] clang/HIP: Remove REQUIRES windows from a test

---
 clang/test/Driver/hip-runtime-libs-msvc.hip | 2 --
 1 file changed, 2 deletions(-)

diff --git a/clang/test/Driver/hip-runtime-libs-msvc.hip b/clang/test/Driver/hip-runtime-libs-msvc.hip
index 8085e77d457e56..943cd0569f4fd1 100644
--- a/clang/test/Driver/hip-runtime-libs-msvc.hip
+++ b/clang/test/Driver/hip-runtime-libs-msvc.hip
@@ -1,5 +1,3 @@
-// REQUIRES: system-windows
-
 // RUN:  touch %t.o
 
 // Test HIP runtime lib args specified by --rocm-path.

>From 29b0bcfbb016aac5cac4dbd75039299ca368d479 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Wed, 16 Oct 2024 16:01:54 +0400
Subject: [PATCH 2/3] Try to fix windows

---
 clang/test/Driver/hip-temps-linux.hip | 5 +++--
 clang/test/Driver/linker-wrapper.c    | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/clang/test/Driver/hip-temps-linux.hip b/clang/test/Driver/hip-temps-linux.hip
index c04121268bf697..12968ebdd024c7 100644
--- a/clang/test/Driver/hip-temps-linux.hip
+++ b/clang/test/Driver/hip-temps-linux.hip
@@ -4,8 +4,9 @@
 // Check no temporary files or directores are left after compilation.
 // RUN: rm -rf %t%{fs-sep}mytmp
 // RUN: mkdir -p %t%{fs-sep}mytmp
-// RUN: env TMPDIR="%t/mytmp" %clang --target=x86_64-linux-gnu -nogpulib -nogpuinc \
-// RUN:   --rocm-path=%S/Inputs/rocm -nostdinc -nostdlib -c \
+// RUN: env TMPDIR="%t/mytmp" TMP="%t/mytmp" %clang --target=x86_64-linux-gnu \
+// RUN:   -nogpulib -nogpuinc -nostdinc -nostdlib \
+// RUN:   --rocm-path=%S/Inputs/rocm -c \
 // RUN:   --offload-arch=gfx1030 -emit-llvm -v %s 2>&1 | \
 // RUN:   FileCheck -DTMPDIR=%t%{fs-sep}mytmp%{fs-sep} %s
 // RUN: ls %t/mytmp >%t/mytmp.txt 2>&1
diff --git a/clang/test/Driver/linker-wrapper.c b/clang/test/Driver/linker-wrapper.c
index 976f7c170fdd69..89492ee9574cb8 100644
--- a/clang/test/Driver/linker-wrapper.c
+++ b/clang/test/Driver/linker-wrapper.c
@@ -118,7 +118,7 @@ __attribute__((visibility("protected"), used)) int x;
 
 // HIP: clang{{.*}} -o [[IMG_GFX90A:.+]] --target=amdgcn-amd-amdhsa -mcpu=gfx90a
 // HIP: clang{{.*}} -o [[IMG_GFX908:.+]] --target=amdgcn-amd-amdhsa -mcpu=gfx908
-// HIP: clang-offload-bundler{{.*}}-type=o -bundle-align=4096 -compress -compression-level=6 -targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa--gfx90a,hip-amdgcn-amd-amdhsa--gfx908 -input=/dev/null -input=[[IMG_GFX90A]] -input=[[IMG_GFX908]] -output={{.*}}.hipfb
+// HIP: clang-offload-bundler{{.*}}-type=o -bundle-align=4096 -compress -compression-level=6 -targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa--gfx90a,hip-amdgcn-amd-amdhsa--gfx908 -input={{/dev/null|NUL}} -input=[[IMG_GFX90A]] -input=[[IMG_GFX908]] -output={{.*}}.hipfb
 
 // RUN: clang-offload-packager -o %t.out \
 // RUN:   --image=file=%t.elf.o,kind=openmp,triple=amdgcn-amd-amdhsa,arch=gfx908 \
@@ -209,7 +209,7 @@ __attribute__((visibility("protected"), used)) int x;
 // RUN:   %t.o -o a.out 2>&1 | FileCheck %s --check-prefix=RELOCATABLE-LINK-HIP
 
 // RELOCATABLE-LINK-HIP: clang{{.*}} -o {{.*}}.img --target=amdgcn-amd-amdhsa
-// RELOCATABLE-LINK-HIP: clang-offload-bundler{{.*}} -type=o -bundle-align=4096 -targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa--gfx90a -input=/dev/null -input={{.*}} -output={{.*}}
+// RELOCATABLE-LINK-HIP: clang-offload-bundler{{.*}} -type=o -bundle-align=4096 -targets=host-x86_64-unknown-linux,hip-amdgcn-amd-amdhsa--gfx90a -input={{/dev/null|NUL}} -input={{.*}} -output={{.*}}
 // RELOCATABLE-LINK-HIP: /usr/bin/ld.lld{{.*}}-r
 // RELOCATABLE-LINK-HIP: llvm-objcopy{{.*}}a.out --remove-section .llvm.offloading
 

>From 2bf91dd78a1ad955d27970fc78ed3b4bddf618f0 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Wed, 16 Oct 2024 17:47:51 +0400
Subject: [PATCH 3/3] Try to fix windows

---
 clang/test/Driver/hip-temps-linux.hip | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/clang/test/Driver/hip-temps-linux.hip b/clang/test/Driver/hip-temps-linux.hip
index 12968ebdd024c7..387ea81e25fce0 100644
--- a/clang/test/Driver/hip-temps-linux.hip
+++ b/clang/test/Driver/hip-temps-linux.hip
@@ -1,10 +1,11 @@
 // REQUIRES: x86-registered-target
 // REQUIRES: amdgpu-registered-target
 
-// Check no temporary files or directores are left after compilation.
+// Check no temporary files or directories are left after compilation.
+
 // RUN: rm -rf %t%{fs-sep}mytmp
 // RUN: mkdir -p %t%{fs-sep}mytmp
-// RUN: env TMPDIR="%t/mytmp" TMP="%t/mytmp" %clang --target=x86_64-linux-gnu \
+// RUN: env TMPDIR="%t/mytmp" TEMP="%t/mytmp" TMP="%t/mytmp" %clang --target=x86_64-linux-gnu \
 // RUN:   -nogpulib -nogpuinc -nostdinc -nostdlib \
 // RUN:   --rocm-path=%S/Inputs/rocm -c \
 // RUN:   --offload-arch=gfx1030 -emit-llvm -v %s 2>&1 | \



More information about the llvm-branch-commits mailing list