[clang] 9deafad - [Clang] Use x86 triple for offload-Xarch.c test
David Spickett via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 5 09:18:48 PST 2025
Author: David Spickett
Date: 2025-02-05T17:17:37Z
New Revision: 9deafad7ab00c81c9869d50bfde2aa47bdaa6dd7
URL: https://github.com/llvm/llvm-project/commit/9deafad7ab00c81c9869d50bfde2aa47bdaa6dd7
DIFF: https://github.com/llvm/llvm-project/commit/9deafad7ab00c81c9869d50bfde2aa47bdaa6dd7.diff
LOG: [Clang] Use x86 triple for offload-Xarch.c test
This fixes an issue where your host triple is not compatible with
the 64 bit ptx being the offload architecture. At least, that's my
guess.
This failed on our Arm 32 bit bot:
https://lab.llvm.org/buildbot/#/builders/154/builds/11413/steps/5/logs/FAIL__Clang__offload-Xarch_c
Crucially it outputted:
clang: warning: argument unused during compilation: '-Xarch_nvptx64 -O3' [-Wunused-command-line-argument]
Making the triple always something 64 bit means this will work everywhere.
Fixes 455cedc805e7a42c6cfbe26a4ddd9e623cca6066 / https://github.com/llvm/llvm-project/pull/125421.
Added:
Modified:
clang/test/Driver/offload-Xarch.c
Removed:
################################################################################
diff --git a/clang/test/Driver/offload-Xarch.c b/clang/test/Driver/offload-Xarch.c
index 978e6763fbdbcd..a85a501b469767 100644
--- a/clang/test/Driver/offload-Xarch.c
+++ b/clang/test/Driver/offload-Xarch.c
@@ -1,4 +1,4 @@
-// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s
+// RUN: %clang --target=x86_64-unknown-linux-gnu -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s
// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s
// RUN: %clang -x hip %s -Xarch_amdgcn -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s
// RUN: %clang -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib -nogpuinc \
More information about the cfe-commits
mailing list