[clang] [clang-sycl-linker] Infer target triple from input bitcode (PR #198036)
Nick Sarnie via cfe-commits
cfe-commits at lists.llvm.org
Tue May 19 07:47:49 PDT 2026
================
@@ -68,10 +70,27 @@
; RUN: | FileCheck %s --check-prefix=NOOUTPUT
; NOOUTPUT: Output file must be specified
;
-; Check that the target triple must be specified.
-; RUN: not clang-sycl-linker --dry-run %t/input1.bc %t/input2.bc -o a.out 2>&1 \
-; RUN: | FileCheck %s --check-prefix=NOTARGET
-; NOTARGET: Target triple must be specified
+; Test error on mismatched triple between inputs.
+; RUN: llvm-as %t/input-mismatch.ll -o %t/input-mismatch.bc
+; RUN: not clang-sycl-linker --dry-run %t/input1.bc %t/input-mismatch.bc -o %t/mismatch.out 2>&1 \
+; RUN: | FileCheck %s --check-prefix=TRIPLE-MISMATCH
+; TRIPLE-MISMATCH: error: conflicting target triples: 'spirv64' (from {{.*}}input1.bc) vs 'spirv32' (from {{.*}}input-mismatch.bc)
----------------
sarnex wrote:
nit: personally i dont like having a trillion tests in a single test file but that's not really introduced by this change
https://github.com/llvm/llvm-project/pull/198036
More information about the cfe-commits
mailing list