Skip to content

[SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support inside clang-sycl-linker #133967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

asudarsa
Copy link
Contributor

@asudarsa asudarsa commented Apr 1, 2025

This PR does the following:

  1. Use SPIR-V backend to do LLVM to SPIR-V translation inside clang-sycl-linker
  2. Remove llvm-spirv translator from clang-sycl-linker Currently, no SPIR-V extensions are enabled for SYCL compilation flow. This will be updated in subsequent commits.

Thanks

Note: This is one of the many PRs being introduced to add SYCL programming model support to LLVM (RFC).

…inside clang-sycl-linker

This PR does the following:

1. Use SPIR-V backend to do LLVM to SPIR-V translation inside clang-sycl-linker
2. Remove llvm-spirv translator from clang-sycl-linker
Currently, no SPIR-V extensions are enabled for SYCL compilation flow. This will be updated in subsequent commits.

Thanks

Signed-off-by: Arvind Sudarsanam <[email protected]>
@asudarsa asudarsa marked this pull request as draft April 1, 2025 19:55
Signed-off-by: Arvind Sudarsanam <[email protected]>
@asudarsa asudarsa force-pushed the add_spirv_backend_to_clang_sycl_linker_upstream branch from 5f7c3ab to 5853448 Compare April 1, 2025 20:14
@asudarsa asudarsa marked this pull request as ready for review April 1, 2025 20:53
Copy link
Contributor

@jhuber6 jhuber6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

LLVMContext C;
std::unique_ptr<Module> M = parseIRFile(File, Err, C);
if (!M)
return createStringError(inconvertibleErrorCode(), Err.getMessage());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can omit the error code in one of the constructors.

if (!M)
return createStringError(inconvertibleErrorCode(), Err.getMessage());

Triple TargetTriple(Args.getLastArgValue(OPT_triple_EQ));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guessing this varies between spirv-unknown-unknown or something?

Copy link
Contributor Author

@asudarsa asudarsa Apr 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This is set by the user. It can take the following values: spirv32-unknown-unknown, spirv64-unknown-unknown, and also spirv64v1.4-unknown-unknown (v1.4 means SPIR-V version 1.4 code is generated; v1.6 is default).

Thanks

return createStringError("Failed to execute SPIR-V Backend");
CodeGenPasses.run(*M);

if (Verbose) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No braces

asudarsa added 2 commits April 1, 2025 14:08
Signed-off-by: Arvind Sudarsanam <[email protected]>
Signed-off-by: Arvind Sudarsanam <[email protected]>
Signed-off-by: Arvind Sudarsanam <[email protected]>
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Apr 2, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 2, 2025

@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: Arvind Sudarsanam (asudarsa)

Changes

This PR does the following:

  1. Use SPIR-V backend to do LLVM to SPIR-V translation inside clang-sycl-linker
  2. Remove llvm-spirv translator from clang-sycl-linker Currently, no SPIR-V extensions are enabled for SYCL compilation flow. This will be updated in subsequent commits.

Thanks

Note: This is one of the many PRs being introduced to add SYCL programming model support to LLVM (RFC).


Full diff: https://github.com/llvm/llvm-project/pull/133967.diff

9 Files Affected:

  • (modified) clang/test/Driver/Inputs/SYCL/bar.ll (+1)
  • (modified) clang/test/Driver/Inputs/SYCL/baz.ll (+1)
  • (modified) clang/test/Driver/Inputs/SYCL/foo.ll (+1)
  • (modified) clang/test/Driver/Inputs/SYCL/libsycl.ll (+1)
  • (modified) clang/test/Driver/clang-sycl-linker-test.cpp (+2-12)
  • (modified) clang/test/Driver/sycl-link-spirv-target.cpp (+3-3)
  • (modified) clang/tools/clang-sycl-linker/CMakeLists.txt (+4-1)
  • (modified) clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp (+68-159)
  • (modified) clang/tools/clang-sycl-linker/SYCLLinkOpts.td (+1-13)
diff --git a/clang/test/Driver/Inputs/SYCL/bar.ll b/clang/test/Driver/Inputs/SYCL/bar.ll
index d17221b8dca18..9f86b8aa54827 100644
--- a/clang/test/Driver/Inputs/SYCL/bar.ll
+++ b/clang/test/Driver/Inputs/SYCL/bar.ll
@@ -1,3 +1,4 @@
+target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1"
 target triple = "spirv64"
 
 define spir_func i32 @bar_func1(i32 %a, i32 %b) {
diff --git a/clang/test/Driver/Inputs/SYCL/baz.ll b/clang/test/Driver/Inputs/SYCL/baz.ll
index 6cdf3735ed77e..1fd7e44881981 100644
--- a/clang/test/Driver/Inputs/SYCL/baz.ll
+++ b/clang/test/Driver/Inputs/SYCL/baz.ll
@@ -1,3 +1,4 @@
+target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1"
 target triple = "spirv64"
 
 define spir_func i32 @bar_func1(i32 %a, i32 %b) {
diff --git a/clang/test/Driver/Inputs/SYCL/foo.ll b/clang/test/Driver/Inputs/SYCL/foo.ll
index 43aaf1424ee2d..fbfd8c53bff9c 100644
--- a/clang/test/Driver/Inputs/SYCL/foo.ll
+++ b/clang/test/Driver/Inputs/SYCL/foo.ll
@@ -1,3 +1,4 @@
+target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1"
 target triple = "spirv64"
 
 define spir_func i32 @foo_func1(i32 %a, i32 %b) {
diff --git a/clang/test/Driver/Inputs/SYCL/libsycl.ll b/clang/test/Driver/Inputs/SYCL/libsycl.ll
index fdc4643e97b6a..b161bde3b0c1e 100644
--- a/clang/test/Driver/Inputs/SYCL/libsycl.ll
+++ b/clang/test/Driver/Inputs/SYCL/libsycl.ll
@@ -1,3 +1,4 @@
+target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1"
 target triple = "spirv64"
 
 define spir_func i32 @addFive(i32 %a) {
diff --git a/clang/test/Driver/clang-sycl-linker-test.cpp b/clang/test/Driver/clang-sycl-linker-test.cpp
index 729561bd09cd8..2f860ae74e97d 100644
--- a/clang/test/Driver/clang-sycl-linker-test.cpp
+++ b/clang/test/Driver/clang-sycl-linker-test.cpp
@@ -6,7 +6,7 @@
 // RUN: clang-sycl-linker --dry-run -v -triple=spirv64 %t_1.bc %t_2.bc -o a.spv 2>&1 \
 // RUN:   | FileCheck %s --check-prefix=SIMPLE-FO
 // SIMPLE-FO: sycl-device-link: inputs: {{.*}}.bc, {{.*}}.bc  libfiles:  output: [[LLVMLINKOUT:.*]].bc
-// SIMPLE-FO-NEXT: "{{.*}}llvm-spirv{{.*}}" {{.*}}-o a.spv [[LLVMLINKOUT]].bc
+// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
 //
 // Test the dry run of a simple case with device library files specified.
 // RUN: touch %T/lib1.bc
@@ -14,7 +14,7 @@
 // RUN: clang-sycl-linker --dry-run -v -triple=spirv64 %t_1.bc %t_2.bc --library-path=%T --device-libs=lib1.bc,lib2.bc -o a.spv 2>&1 \
 // RUN:   | FileCheck %s --check-prefix=DEVLIBS
 // DEVLIBS: sycl-device-link: inputs: {{.*}}.bc  libfiles: {{.*}}lib1.bc, {{.*}}lib2.bc  output: [[LLVMLINKOUT:.*]].bc
-// DEVLIBS-NEXT: "{{.*}}llvm-spirv{{.*}}" {{.*}}-o a.spv [[LLVMLINKOUT]].bc
+// DEVLIBS-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
 //
 // Test a simple case with a random file (not bitcode) as input.
 // RUN: touch %t.o
@@ -29,13 +29,3 @@
 // RUN: not clang-sycl-linker --dry-run -triple=spirv64 %t_1.bc %t_2.bc --library-path=%T --device-libs=lib1.bc,lib2.bc,lib3.bc -o a.spv 2>&1 \
 // RUN:   | FileCheck %s --check-prefix=DEVLIBSERR2
 // DEVLIBSERR2: '{{.*}}lib3.bc' SYCL device library file is not found
-//
-// Test if correct set of llvm-spirv options are emitted for windows environment.
-// RUN: clang-sycl-linker --dry-run -v -triple=spirv64 --is-windows-msvc-env %t_1.bc %t_2.bc -o a.spv 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=LLVMOPTSWIN
-// LLVMOPTSWIN: -spirv-debug-info-version=ocl-100 -spirv-allow-extra-diexpressions -spirv-allow-unknown-intrinsics=llvm.genx. -spirv-ext=
-//
-// Test if correct set of llvm-spirv options are emitted for linux environment.
-// RUN: clang-sycl-linker --dry-run -v -triple=spirv64  %t_1.bc %t_2.bc -o a.spv 2>&1 \
-// RUN:   | FileCheck %s --check-prefix=LLVMOPTSLIN
-// LLVMOPTSLIN: -spirv-debug-info-version=nonsemantic-shader-200 -spirv-allow-unknown-intrinsics=llvm.genx. -spirv-ext=
diff --git a/clang/test/Driver/sycl-link-spirv-target.cpp b/clang/test/Driver/sycl-link-spirv-target.cpp
index 7585ef8b14a59..586adae619165 100644
--- a/clang/test/Driver/sycl-link-spirv-target.cpp
+++ b/clang/test/Driver/sycl-link-spirv-target.cpp
@@ -3,7 +3,7 @@
 //
 // Test that -Xlinker options are being passed to clang-sycl-linker.
 // RUN: touch %t.bc
-// RUN: %clangxx -### --target=spirv64 --sycl-link -Xlinker --llvm-spirv-path=/tmp \
-// RUN:   -Xlinker -triple=spirv64 -Xlinker --library-path=/tmp -Xlinker --device-libs=lib1.bc,lib2.bc %t.bc 2>&1 \
+// RUN: %clangxx -### --target=spirv64 --sycl-link -Xlinker -triple=spirv64 -Xlinker --library-path=/tmp \
+// RUN:   -Xlinker --device-libs=lib1.bc,lib2.bc %t.bc 2>&1 \
 // RUN:   | FileCheck %s -check-prefix=XLINKEROPTS
-// XLINKEROPTS: "{{.*}}clang-sycl-linker{{.*}}" "--llvm-spirv-path=/tmp" "-triple=spirv64" "--library-path=/tmp" "--device-libs=lib1.bc,lib2.bc" "{{.*}}.bc" "-o" "a.out"
+// XLINKEROPTS: "{{.*}}clang-sycl-linker{{.*}}" "-triple=spirv64" "--library-path=/tmp" "--device-libs=lib1.bc,lib2.bc" "{{.*}}.bc" "-o" "a.out"
diff --git a/clang/tools/clang-sycl-linker/CMakeLists.txt b/clang/tools/clang-sycl-linker/CMakeLists.txt
index 382c0ca441940..ee89e8b0a5570 100644
--- a/clang/tools/clang-sycl-linker/CMakeLists.txt
+++ b/clang/tools/clang-sycl-linker/CMakeLists.txt
@@ -1,14 +1,17 @@
 set(LLVM_LINK_COMPONENTS
   ${LLVM_TARGETS_TO_BUILD}
+  Analysis
   BinaryFormat
   BitWriter
   Core
   IRReader
   Linker
+  MC
   Option
   Object
-  TargetParser
   Support
+  Target
+  TargetParser
   )
 
 set(LLVM_TARGET_DEFINITIONS SYCLLinkOpts.td)
diff --git a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
index 8dd0394e9610e..d8952158ae21c 100644
--- a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+++ b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
@@ -25,6 +25,7 @@
 #include "llvm/IRReader/IRReader.h"
 #include "llvm/LTO/LTO.h"
 #include "llvm/Linker/Linker.h"
+#include "llvm/MC/TargetRegistry.h"
 #include "llvm/Object/Archive.h"
 #include "llvm/Object/ArchiveWriter.h"
 #include "llvm/Object/Binary.h"
@@ -48,6 +49,7 @@
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/Support/TimeProfiler.h"
 #include "llvm/Support/WithColor.h"
+#include "llvm/Target/TargetMachine.h"
 
 using namespace llvm;
 using namespace llvm::opt;
@@ -124,12 +126,6 @@ const OptTable &getOptTable() {
   exit(EXIT_FAILURE);
 }
 
-std::string getMainExecutable(const char *Name) {
-  void *Ptr = (void *)(intptr_t)&getMainExecutable;
-  auto COWPath = sys::fs::getMainExecutable(Name, Ptr);
-  return sys::path::parent_path(COWPath).str();
-}
-
 Expected<StringRef> createTempFile(const ArgList &Args, const Twine &Prefix,
                                    StringRef Extension) {
   SmallString<128> OutputFile;
@@ -147,40 +143,6 @@ Expected<StringRef> createTempFile(const ArgList &Args, const Twine &Prefix,
   return TempFiles.back();
 }
 
-Expected<std::string> findProgram(const ArgList &Args, StringRef Name,
-                                  ArrayRef<StringRef> Paths) {
-  if (Args.hasArg(OPT_dry_run))
-    return Name.str();
-  ErrorOr<std::string> Path = sys::findProgramByName(Name, Paths);
-  if (!Path)
-    Path = sys::findProgramByName(Name);
-  if (!Path)
-    return createStringError(Path.getError(),
-                             "Unable to find '" + Name + "' in path");
-  return *Path;
-}
-
-void printCommands(ArrayRef<StringRef> CmdArgs) {
-  if (CmdArgs.empty())
-    return;
-
-  llvm::errs() << " \"" << CmdArgs.front() << "\" ";
-  llvm::errs() << llvm::join(std::next(CmdArgs.begin()), CmdArgs.end(), " ")
-               << "\n";
-}
-
-/// Execute the command \p ExecutablePath with the arguments \p Args.
-Error executeCommands(StringRef ExecutablePath, ArrayRef<StringRef> Args) {
-  if (Verbose || DryRun)
-    printCommands(Args);
-
-  if (!DryRun)
-    if (sys::ExecuteAndWait(ExecutablePath, Args))
-      return createStringError(
-          "'%s' failed", sys::path::filename(ExecutablePath).str().c_str());
-  return Error::success();
-}
-
 Expected<SmallVector<std::string>> getInput(const ArgList &Args) {
   // Collect all input bitcode files to be passed to the device linking stage.
   SmallVector<std::string> BitcodeFiles;
@@ -211,7 +173,7 @@ Expected<std::unique_ptr<Module>> getBitcodeModule(StringRef File,
 
   auto M = getLazyIRFileModule(File, Err, C);
   if (M)
-    return M;
+    return std::move(M);
   return createStringError(Err.getMessage());
 }
 
@@ -249,12 +211,11 @@ Expected<SmallVector<std::string>> getSYCLDeviceLibs(const ArgList &Args) {
 /// 3. Link all the images gathered in Step 2 with the output of Step 1 using
 /// linkInModule API. LinkOnlyNeeded flag is used.
 Expected<StringRef> linkDeviceCode(ArrayRef<std::string> InputFiles,
-                                   const ArgList &Args) {
+                                   const ArgList &Args, LLVMContext &C) {
   llvm::TimeTraceScope TimeScope("SYCL link device code");
 
   assert(InputFiles.size() && "No inputs to link");
 
-  LLVMContext C;
   auto LinkerOutput = std::make_unique<Module>("sycl-device-link", C);
   Linker L(*LinkerOutput);
   // Link SYCL device input files.
@@ -313,120 +274,61 @@ Expected<StringRef> linkDeviceCode(ArrayRef<std::string> InputFiles,
   return *BitcodeOutput;
 }
 
-/// Add any llvm-spirv option that relies on a specific Triple in addition
-/// to user supplied options.
-static void getSPIRVTransOpts(const ArgList &Args,
-                              SmallVector<StringRef, 8> &TranslatorArgs,
-                              const llvm::Triple Triple) {
-  // Enable NonSemanticShaderDebugInfo.200 for non-Windows
-  const bool IsWindowsMSVC =
-      Triple.isWindowsMSVCEnvironment() || Args.hasArg(OPT_is_windows_msvc_env);
-  const bool EnableNonSemanticDebug = !IsWindowsMSVC;
-  if (EnableNonSemanticDebug) {
-    TranslatorArgs.push_back(
-        "-spirv-debug-info-version=nonsemantic-shader-200");
-  } else {
-    TranslatorArgs.push_back("-spirv-debug-info-version=ocl-100");
-    // Prevent crash in the translator if input IR contains DIExpression
-    // operations which don't have mapping to OpenCL.DebugInfo.100 spec.
-    TranslatorArgs.push_back("-spirv-allow-extra-diexpressions");
-  }
-  std::string UnknownIntrinsics("-spirv-allow-unknown-intrinsics=llvm.genx.");
-
-  TranslatorArgs.push_back(Args.MakeArgString(UnknownIntrinsics));
-
-  // Disable all the extensions by default
-  std::string ExtArg("-spirv-ext=-all");
-  std::string DefaultExtArg =
-      ",+SPV_EXT_shader_atomic_float_add,+SPV_EXT_shader_atomic_float_min_max"
-      ",+SPV_KHR_no_integer_wrap_decoration,+SPV_KHR_float_controls"
-      ",+SPV_KHR_expect_assume,+SPV_KHR_linkonce_odr";
-  std::string INTELExtArg =
-      ",+SPV_INTEL_subgroups,+SPV_INTEL_media_block_io"
-      ",+SPV_INTEL_device_side_avc_motion_estimation"
-      ",+SPV_INTEL_fpga_loop_controls,+SPV_INTEL_unstructured_loop_controls"
-      ",+SPV_INTEL_fpga_reg,+SPV_INTEL_blocking_pipes"
-      ",+SPV_INTEL_function_pointers,+SPV_INTEL_kernel_attributes"
-      ",+SPV_INTEL_io_pipes,+SPV_INTEL_inline_assembly"
-      ",+SPV_INTEL_arbitrary_precision_integers"
-      ",+SPV_INTEL_float_controls2,+SPV_INTEL_vector_compute"
-      ",+SPV_INTEL_fast_composite"
-      ",+SPV_INTEL_arbitrary_precision_fixed_point"
-      ",+SPV_INTEL_arbitrary_precision_floating_point"
-      ",+SPV_INTEL_variable_length_array,+SPV_INTEL_fp_fast_math_mode"
-      ",+SPV_INTEL_long_composites"
-      ",+SPV_INTEL_arithmetic_fence"
-      ",+SPV_INTEL_global_variable_decorations"
-      ",+SPV_INTEL_cache_controls"
-      ",+SPV_INTEL_fpga_buffer_location"
-      ",+SPV_INTEL_fpga_argument_interfaces"
-      ",+SPV_INTEL_fpga_invocation_pipelining_attributes"
-      ",+SPV_INTEL_fpga_latency_control"
-      ",+SPV_INTEL_task_sequence"
-      ",+SPV_KHR_shader_clock"
-      ",+SPV_INTEL_bindless_images";
-  ExtArg = ExtArg + DefaultExtArg + INTELExtArg;
-  ExtArg += ",+SPV_INTEL_token_type"
-            ",+SPV_INTEL_bfloat16_conversion"
-            ",+SPV_INTEL_joint_matrix"
-            ",+SPV_INTEL_hw_thread_queries"
-            ",+SPV_KHR_uniform_group_instructions"
-            ",+SPV_INTEL_masked_gather_scatter"
-            ",+SPV_INTEL_tensor_float32_conversion"
-            ",+SPV_INTEL_optnone"
-            ",+SPV_KHR_non_semantic_info"
-            ",+SPV_KHR_cooperative_matrix";
-  TranslatorArgs.push_back(Args.MakeArgString(ExtArg));
-}
-
 /// Run LLVM to SPIR-V translation.
-/// Converts 'File' from LLVM bitcode to SPIR-V format using llvm-spirv tool.
+/// Converts 'File' from LLVM bitcode to SPIR-V format using SPIR-V backend.
 /// 'Args' encompasses all arguments required for linking device code and will
-/// be parsed to generate options required to be passed into llvm-spirv tool.
-static Expected<StringRef> runLLVMToSPIRVTranslation(StringRef File,
-                                                     const ArgList &Args) {
-  llvm::TimeTraceScope TimeScope("LLVMToSPIRVTranslation");
-  StringRef LLVMSPIRVPath = Args.getLastArgValue(OPT_llvm_spirv_path_EQ);
-  Expected<std::string> LLVMToSPIRVProg =
-      findProgram(Args, "llvm-spirv", {LLVMSPIRVPath});
-  if (!LLVMToSPIRVProg)
-    return LLVMToSPIRVProg.takeError();
-
-  SmallVector<StringRef, 8> CmdArgs;
-  CmdArgs.push_back(*LLVMToSPIRVProg);
-  const llvm::Triple Triple(Args.getLastArgValue(OPT_triple_EQ));
-  getSPIRVTransOpts(Args, CmdArgs, Triple);
-  StringRef LLVMToSPIRVOptions;
-  if (Arg *A = Args.getLastArg(OPT_llvm_spirv_options_EQ))
-    LLVMToSPIRVOptions = A->getValue();
-  LLVMToSPIRVOptions.split(CmdArgs, " ", /* MaxSplit = */ -1,
-                           /* KeepEmpty = */ false);
-  CmdArgs.append({"-o", OutputFile});
-  CmdArgs.push_back(File);
-  if (Error Err = executeCommands(*LLVMToSPIRVProg, CmdArgs))
-    return std::move(Err);
-
-  if (!SPIRVDumpDir.empty()) {
-    std::error_code EC =
-        llvm::sys::fs::create_directory(SPIRVDumpDir, /*IgnoreExisting*/ true);
-    if (EC)
-      return createStringError(
-          EC,
-          formatv("failed to create dump directory. path: {0}, error_code: {1}",
-                  SPIRVDumpDir, EC.value()));
-
-    StringRef Path = OutputFile;
-    StringRef Filename = llvm::sys::path::filename(Path);
-    SmallString<128> CopyPath = SPIRVDumpDir;
-    CopyPath.append(Filename);
-    EC = llvm::sys::fs::copy_file(Path, CopyPath);
-    if (EC)
-      return createStringError(
-          EC,
-          formatv(
-              "failed to copy file. original: {0}, copy: {1}, error_code: {2}",
-              Path, CopyPath, EC.value()));
-  }
+/// be parsed to generate options required to be passed into the backend.
+static Expected<StringRef> runSPIRVCodeGen(StringRef File,
+                                           const ArgList &Args, LLVMContext &C) {
+  llvm::TimeTraceScope TimeScope("SPIR-V code generation");
+
+  // Parse input module.
+  SMDiagnostic Err;
+  std::unique_ptr<Module> M = parseIRFile(File, Err, C);
+  if (!M)
+    return createStringError(Err.getMessage());
+
+  Triple TargetTriple(Args.getLastArgValue(OPT_triple_EQ));
+  M->setTargetTriple(TargetTriple);
+
+  // Get a handle to SPIR-V target backend.
+  std::string Msg;
+  const Target *T = TargetRegistry::lookupTarget(M->getTargetTriple(), Msg);
+  if (!T)
+    return createStringError(Msg + ": " + M->getTargetTriple().str());
+
+  // Allocate SPIR-V target machine.
+  TargetOptions Options;
+  std::optional<Reloc::Model> RM;
+  std::optional<CodeModel::Model> CM;
+  std::unique_ptr<TargetMachine> TM(
+      T->createTargetMachine(M->getTargetTriple(), /* CPU */ "",
+                             /* Features */ "", Options, RM, CM));
+  if (!TM)
+    return createStringError("Could not allocate target machine!");
+
+  // Set data layout if needed.
+  if (M->getDataLayout().isDefault())
+    M->setDataLayout(TM->createDataLayout());
+
+  // Open output file for writing.
+  int FD = -1;
+  if (std::error_code EC = sys::fs::openFileForWrite(OutputFile, FD))
+    return errorCodeToError(EC);
+  auto OS = std::make_unique<llvm::raw_fd_ostream>(FD, true);
+
+  // Run SPIR-V codegen passes to generate SPIR-V file.
+  legacy::PassManager CodeGenPasses;
+  TargetLibraryInfoImpl TLII(M->getTargetTriple());
+  CodeGenPasses.add(new TargetLibraryInfoWrapperPass(TLII));
+  if (TM->addPassesToEmitFile(CodeGenPasses, *OS, nullptr,
+                              CodeGenFileType::ObjectFile))
+    return createStringError("Failed to execute SPIR-V Backend");
+  CodeGenPasses.run(*M);
+
+  if (Verbose)
+    errs() << formatv("SPIR-V Backend: input: {0}, output: {1}\n", File,
+                      OutputFile);
 
   return OutputFile;
 }
@@ -435,15 +337,17 @@ static Expected<StringRef> runLLVMToSPIRVTranslation(StringRef File,
 /// 1. Link input device code (user code and SYCL device library code).
 /// 2. Run SPIR-V code generation.
 Error runSYCLLink(ArrayRef<std::string> Files, const ArgList &Args) {
-  llvm::TimeTraceScope TimeScope("SYCLDeviceLink");
+  llvm::TimeTraceScope TimeScope("SYCL device linking");
+
+  LLVMContext C;
 
   // Link all input bitcode files and SYCL device library files, if any.
-  auto LinkedFile = linkDeviceCode(Files, Args);
+  auto LinkedFile = linkDeviceCode(Files, Args, C);
   if (!LinkedFile)
     reportError(LinkedFile.takeError());
 
-  // LLVM to SPIR-V translation step
-  auto SPVFile = runLLVMToSPIRVTranslation(*LinkedFile, Args);
+  // SPIR-V code generation step.
+  auto SPVFile = runSPIRVCodeGen(*LinkedFile, Args, C);
   if (!SPVFile)
     return SPVFile.takeError();
   return Error::success();
@@ -453,6 +357,11 @@ Error runSYCLLink(ArrayRef<std::string> Files, const ArgList &Args) {
 
 int main(int argc, char **argv) {
   InitLLVM X(argc, argv);
+  InitializeAllTargetInfos();
+  InitializeAllTargets();
+  InitializeAllTargetMCs();
+  InitializeAllAsmParsers();
+  InitializeAllAsmPrinters();
 
   Executable = argv[0];
   sys::PrintStackTraceOnErrorSignal(argv[0]);
diff --git a/clang/tools/clang-sycl-linker/SYCLLinkOpts.td b/clang/tools/clang-sycl-linker/SYCLLinkOpts.td
index 40c7310076045..1006784973b87 100644
--- a/clang/tools/clang-sycl-linker/SYCLLinkOpts.td
+++ b/clang/tools/clang-sycl-linker/SYCLLinkOpts.td
@@ -27,7 +27,7 @@ def device_libs_EQ : CommaJoined<["--", "-"], "device-libs=">,
 def arch_EQ : Joined<["--", "-"], "arch=">,
               Flags<[LinkerOnlyOption]>,
               MetaVarName<"<arch>">,
-              HelpText<"The device subarchitecture">;
+              HelpText<"The device architecture">;
 def triple_EQ : Joined<["--", "-"], "triple=">,
                 Flags<[LinkerOnlyOption]>,
                 MetaVarName<"<triple>">,
@@ -43,18 +43,6 @@ def spirv_dump_device_code_EQ : Joined<["--", "-"], "spirv-dump-device-code=">,
   Flags<[LinkerOnlyOption]>,
   HelpText<"Path to the folder where the tool dumps SPIR-V device code. Other formats aren't dumped.">;
 
-def is_windows_msvc_env : Flag<["--", "-"], "is-windows-msvc-env">,
-  Flags<[LinkerOnlyOption, HelpHidden]>;
-
-def llvm_spirv_path_EQ : Joined<["--"], "llvm-spirv-path=">,
-  Flags<[LinkerOnlyOption]>, MetaVarName<"<dir>">,
-  HelpText<"Set the system llvm-spirv path">;
-
-// Options to pass to llvm-spirv tool
-def llvm_spirv_options_EQ : Joined<["--", "-"], "llvm-spirv-options=">,
-  Flags<[LinkerOnlyOption]>,
-  HelpText<"Options that will control llvm-spirv step">;
-
 def print_linked_module : Flag<["--"], "print-linked-module">,
                           Flags<[LinkerOnlyOption]>,
                           HelpText<"Print the linked module's IR for testing">;

Copy link

github-actions bot commented Apr 2, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

asudarsa added 2 commits April 2, 2025 06:03
Signed-off-by: Arvind Sudarsanam <[email protected]>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@asudarsa
Copy link
Contributor Author

asudarsa commented Apr 2, 2025

@sarnex, @jhuber6

Thanks much for your kind feedbacks. This is ready to be merged. Can one of you please help?

Sincerely

@sarnex sarnex merged commit 4a4d41e into llvm:main Apr 2, 2025
6 of 9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-ubuntu-fast running on sie-linux-worker while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/21835

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc # RUN: at line 4
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc # RUN: at line 5
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO # RUN: at line 6
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv
�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp:9:20: �[0m�[0;1;31merror: �[0m�[1mSIMPLE-FO-NEXT: expected string not found in input
�[0m// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
�[0;1;32m                   ^
�[0m�[1m<stdin>:1:355: �[0m�[0;1;30mnote: �[0m�[1mscanning from here
�[0msycl-device-link: inputs: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-x1yvkj2z/a.spv-4b4a08.bc
�[0;1;32m                                                                                                                                                                                                                                                                                                                                                                  ^
�[0m�[1m<stdin>:1:355: �[0m�[0;1;30mnote: �[0m�[1mwith "LLVMLINKOUT" equal to "/tmp/lit-tmp-x1yvkj2z/a\\.spv-4b4a08"
�[0msycl-device-link: inputs: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-x1yvkj2z/a.spv-4b4a08.bc
�[0;1;32m                                                                                                                                                                                                                                                                                                                                                                  ^
�[0m�[1m<stdin>:2:84: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64
�[0;1;32m                                                                                   ^
�[0m
Input file: <stdin>
Check file: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
�[1m�[0m�[0;1;30m           1: �[0m�[1m�[0;1;46m�[0msycl-device-link: inputs: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-x1yvkj2z/a.spv-4b4a08.bc�[0;1;46m �[0m
�[0;1;32mcheck:8'0     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
�[0m�[0;1;32mcheck:8'1                                                                                                                                                                                                                                                                                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     captured var "LLVMLINKOUT"
�[0m�[0;1;31mnext:9'0                                                                                                                                                                                                                                                                                                                                                                        X error: no match found
�[0m�[0;1;31mnext:9'1                                                                                                                                                                                                                                                                                                                                                                          with "LLVMLINKOUT" equal to "/tmp/lit-tmp-x1yvkj2z/a\\.spv-4b4a08"
�[0m�[0;1;30m           2: �[0m�[1m�[0;1;46m/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64 �[0m
�[0;1;31mnext:9'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
�[0m�[0;1;35mnext:9'2                                                                                         ?                                                                                   possible intended match
�[0m>>>>>>

--

********************


@sarnex
Copy link
Member

sarnex commented Apr 2, 2025

@asudarsa Can you please investigate the above failure immediately?

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building clang at step 6 "Add check check-clang".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/20355

Here is the relevant piece of the build log for the reference
Step 6 (Add check check-clang) failure: test (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc # RUN: at line 4
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc # RUN: at line 5
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO # RUN: at line 6
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
                   ^
<stdin>:1:347: note: scanning from here
sycl-device-link: inputs: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-xkwu2lef/a.spv-5691cc.bc
                                                                                                                                                                                                                                                                                                                                                          ^
<stdin>:1:347: note: with "LLVMLINKOUT" equal to "/tmp/lit-tmp-xkwu2lef/a\\.spv-5691cc"
sycl-device-link: inputs: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-xkwu2lef/a.spv-5691cc.bc
                                                                                                                                                                                                                                                                                                                                                          ^
<stdin>:2:80: note: possible intended match here
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64
                                                                               ^

Input file: <stdin>
Check file: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: sycl-device-link: inputs: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-xkwu2lef/a.spv-5691cc.bc 
next:9'0                                                                                                                                                                                                                                                                                                                                                               X error: no match found
next:9'1                                                                                                                                                                                                                                                                                                                                                                 with "LLVMLINKOUT" equal to "/tmp/lit-tmp-xkwu2lef/a\\.spv-5691cc"
          2: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64 
next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:9'2                                                                                    ?                                                                                   possible intended match
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-amdgpu-runtime-2 running on rocm-worker-hw-02 while building clang at step 7 "Add check check-clang".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/2698

Here is the relevant piece of the build log for the reference
Step 7 (Add check check-clang) failure: test (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc # RUN: at line 4
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc # RUN: at line 5
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO # RUN: at line 6
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
                   ^
<stdin>:1:349: note: scanning from here
sycl-device-link: inputs: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-faew3ndu/a.spv-b34085.bc
                                                                                                                                                                                                                                                                                                                                                            ^
<stdin>:1:349: note: with "LLVMLINKOUT" equal to "/tmp/lit-tmp-faew3ndu/a\\.spv-b34085"
sycl-device-link: inputs: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-faew3ndu/a.spv-b34085.bc
                                                                                                                                                                                                                                                                                                                                                            ^
<stdin>:2:81: note: possible intended match here
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64
                                                                                ^

Input file: <stdin>
Check file: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/clang/test/Driver/clang-sycl-linker-test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: sycl-device-link: inputs: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-faew3ndu/a.spv-b34085.bc 
next:9'0                                                                                                                                                                                                                                                                                                                                                                 X error: no match found
next:9'1                                                                                                                                                                                                                                                                                                                                                                   with "LLVMLINKOUT" equal to "/tmp/lit-tmp-faew3ndu/a\\.spv-b34085"
          2: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64 
next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:9'2                                                                                     ?                                                                                   possible intended match
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-win running on sie-win-worker while building clang at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/14555

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 4
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe --driver-mode=g++ -emit-llvm -c -target spirv64 Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp -o Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' --driver-mode=g++ -emit-llvm -c -target spirv64 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' -o 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc'
# RUN: at line 5
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe --driver-mode=g++ -emit-llvm -c -target spirv64 Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp -o Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' --driver-mode=g++ -emit-llvm -c -target spirv64 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' -o 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc'
# RUN: at line 6
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang-sycl-linker.exe --dry-run -v -triple=spirv64 Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang-sycl-linker.exe' --dry-run -v -triple=spirv64 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc' 'Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc' -o a.spv
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' --check-prefix=SIMPLE-FO
# .---command stderr------------
# | �[1mZ:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp:9:20: �[0m�[0;1;31merror: �[0m�[1mSIMPLE-FO-NEXT: expected string not found in input
�[0m# | �[1m�[0m// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
# | �[0;1;32m                   ^
�[0m# | �[0;1;32m�[0m�[1m<stdin>:1:323: �[0m�[0;1;30mnote: �[0m�[1mscanning from here
�[0m# | �[1m�[0msycl-device-link: inputs: Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\Users\buildbot\AppData\Local\Temp\lit-tmp-jpwa313o\a.spv-632d3a.bc
# | �[0;1;32m                                                                                                                                                                                                                                                                                                                                  ^
�[0m# | �[0;1;32m�[0m�[1m<stdin>:1:323: �[0m�[0;1;30mnote: �[0m�[1mwith "LLVMLINKOUT" equal to "C:\\\\Users\\\\buildbot\\\\AppData\\\\Local\\\\Temp\\\\lit-tmp-jpwa313o\\\\a\\.spv-632d3a"
�[0m# | �[1m�[0msycl-device-link: inputs: Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\Users\buildbot\AppData\Local\Temp\lit-tmp-jpwa313o\a.spv-632d3a.bc
# | �[0;1;32m                                                                                                                                                                                                                                                                                                                                  ^
�[0m# | �[0;1;32m�[0m�[1m<stdin>:2:56: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m# | �[1m�[0mz:\b\llvm-clang-x86_64-sie-win\build\bin\clang-sycl-linker.exe: error: No available targets are compatible with triple "spirv64": spirv64
# | �[0;1;32m                                                       ^
�[0m# | �[0;1;32m�[0m
# | Input file: <stdin>
# | Check file: Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# | �[1m�[0m�[0;1;30m           1: �[0m�[1m�[0;1;46m�[0msycl-device-link: inputs: Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, Z:\b\llvm-clang-x86_64-sie-win\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\Users\buildbot\AppData\Local\Temp\lit-tmp-jpwa313o\a.spv-632d3a.bc�[0;1;46m �[0m
# | �[0;1;32mcheck:8'0     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
�[0m# | �[0;1;32m�[0m�[0;1;32mcheck:8'1                                                                                                                                                                                                                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     captured var "LLVMLINKOUT"
�[0m# | �[0;1;32m�[0m�[0;1;31mnext:9'0                                                                                                                                                                                                                                                                                                                                        X error: no match found
�[0m# | �[0;1;31m�[0m�[0;1;31mnext:9'1                                                                                                                                                                                                                                                                                                                                          with "LLVMLINKOUT" equal to "C:\\\\Users\\\\buildbot\\\\AppData\\\\Local\\\\Temp\\\\lit-tmp-jpwa313o\\\\a\\.spv-632d3a"
�[0m# | �[0;1;31m�[0m�[0;1;30m           2: �[0m�[1m�[0;1;46mz:\b\llvm-clang-x86_64-sie-win\build\bin\clang-sycl-linker.exe: error: No available targets are compatible with triple "spirv64": spirv64 �[0m
# | �[0;1;31mnext:9'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
�[0m# | �[0;1;31m�[0m�[0;1;35mnext:9'2                                                             ?                                                                                   possible intended match
�[0m# | �[0;1;35m�[0m>>>>>>
# `-----------------------------
# error: command failed with exit status: 1

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-aarch64-darwin running on doug-worker-5 while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/17571

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc # RUN: at line 4
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc
/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc # RUN: at line 5
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc
/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO # RUN: at line 6
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv
+ /Users/buildbot/buildbot-root/aarch64-darwin/build/bin/FileCheck /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
�[1m/Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp:9:20: �[0m�[0;1;31merror: �[0m�[1mSIMPLE-FO-NEXT: expected string not found in input
�[0m// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
�[0;1;32m                   ^
�[0m�[1m<stdin>:1:363: �[0m�[0;1;30mnote: �[0m�[1mscanning from here
�[0msycl-device-link: inputs: /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /var/folders/qg/gb2hp8jx3g969f6phcsc_d_80000gt/T/lit-tmp-bnnoyf49/a.spv-f7b211.bc
�[0;1;32m                                                                                                                                                                                                                                                                                                                                                                          ^
�[0m�[1m<stdin>:1:363: �[0m�[0;1;30mnote: �[0m�[1mwith "LLVMLINKOUT" equal to "/var/folders/qg/gb2hp8jx3g969f6phcsc_d_80000gt/T/lit-tmp-bnnoyf49/a\\.spv-f7b211"
�[0msycl-device-link: inputs: /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /var/folders/qg/gb2hp8jx3g969f6phcsc_d_80000gt/T/lit-tmp-bnnoyf49/a.spv-f7b211.bc
�[0;1;32m                                                                                                                                                                                                                                                                                                                                                                          ^
�[0m�[1m<stdin>:2:66: �[0m�[0;1;30mnote: �[0m�[1mpossible intended match here
�[0m/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64
�[0;1;32m                                                                 ^
�[0m
Input file: <stdin>
Check file: /Users/buildbot/buildbot-root/aarch64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
�[1m�[0m�[0;1;30m           1: �[0m�[1m�[0;1;46m�[0msycl-device-link: inputs: /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /Users/buildbot/buildbot-root/aarch64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /var/folders/qg/gb2hp8jx3g969f6phcsc_d_80000gt/T/lit-tmp-bnnoyf49/a.spv-f7b211.bc�[0;1;46m �[0m
�[0;1;32mcheck:8'0     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
�[0m�[0;1;32mcheck:8'1                                                                                                                                                                                                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     captured var "LLVMLINKOUT"
�[0m�[0;1;31mnext:9'0                                                                                                                                                                                                                                                                                                                                                                                X error: no match found
�[0m�[0;1;31mnext:9'1                                                                                                                                                                                                                                                                                                                                                                                  with "LLVMLINKOUT" equal to "/var/folders/qg/gb2hp8jx3g969f6phcsc_d_80000gt/T/lit-tmp-bnnoyf49/a\\.spv-f7b211"
�[0m�[0;1;30m           2: �[0m�[1m�[0;1;46m/Users/buildbot/buildbot-root/aarch64-darwin/build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64 �[0m
�[0;1;31mnext:9'0      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
�[0m�[0;1;35mnext:9'2                                                                       ?                                                                                   possible intended match
�[0m>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder clang-cmake-x86_64-avx512-linux running on avx512-intel64 while building clang at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/13870

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc # RUN: at line 4
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc # RUN: at line 5
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/FileCheck /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO # RUN: at line 6
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/FileCheck /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Driver/clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
                   ^
<stdin>:1:361: note: scanning from here
sycl-device-link: inputs: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-2u5fplzj/a.spv-61edec.bc
                                                                                                                                                                                                                                                                                                                                                                        ^
<stdin>:1:361: note: with "LLVMLINKOUT" equal to "/tmp/lit-tmp-2u5fplzj/a\\.spv-61edec"
sycl-device-link: inputs: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-2u5fplzj/a.spv-61edec.bc
                                                                                                                                                                                                                                                                                                                                                                        ^
<stdin>:2:87: note: possible intended match here
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64
                                                                                      ^

Input file: <stdin>
Check file: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Driver/clang-sycl-linker-test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: sycl-device-link: inputs: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-2u5fplzj/a.spv-61edec.bc 
next:9'0                                                                                                                                                                                                                                                                                                                                                                             X error: no match found
next:9'1                                                                                                                                                                                                                                                                                                                                                                               with "LLVMLINKOUT" equal to "/tmp/lit-tmp-2u5fplzj/a\\.spv-61edec"
          2: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64 
next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:9'2                                                                                           ?                                                                                   possible intended match
>>>>>>

--

********************


@asudarsa
Copy link
Contributor Author

asudarsa commented Apr 2, 2025

Working on a fix...Thanks

@asudarsa
Copy link
Contributor Author

asudarsa commented Apr 2, 2025

@asudarsa Can you please investigate the above failure immediately?

@sarnex, Fix added here for review: #134125

sarnex pushed a commit that referenced this pull request Apr 2, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
This should fix failures caused by
#133967
Attn: @sarnex 
Thanks

Signed-off-by: Arvind Sudarsanam <[email protected]>
@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder clang-armv8-quick running on linaro-clang-armv8-quick while building clang at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/14300

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc # RUN: at line 4
+ /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc
/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc # RUN: at line 5
+ /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc
/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO # RUN: at line 6
+ /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv
+ /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
/home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
                   ^
<stdin>:1:321: note: scanning from here
sycl-device-link: inputs: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-5khqnfrj/a.spv-5d1896.bc
                                                                                                                                                                                                                                                                                                                                ^
<stdin>:1:321: note: with "LLVMLINKOUT" equal to "/tmp/lit-tmp-5khqnfrj/a\\.spv-5d1896"
sycl-device-link: inputs: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-5khqnfrj/a.spv-5d1896.bc
                                                                                                                                                                                                                                                                                                                                ^
<stdin>:2:67: note: possible intended match here
/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64
                                                                  ^

Input file: <stdin>
Check file: /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: sycl-device-link: inputs: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-5khqnfrj/a.spv-5d1896.bc 
next:9'0                                                                                                                                                                                                                                                                                                                                     X error: no match found
next:9'1                                                                                                                                                                                                                                                                                                                                       with "LLVMLINKOUT" equal to "/tmp/lit-tmp-5khqnfrj/a\\.spv-5d1896"
          2: /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64 
next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:9'2                                                                       ?                                                                                   possible intended match
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder arc-builder running on arc-worker while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/13987

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/buildbot/worker/arc-folder/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /buildbot/worker/arc-folder/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc # RUN: at line 4
+ /buildbot/worker/arc-folder/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /buildbot/worker/arc-folder/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc
/buildbot/worker/arc-folder/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /buildbot/worker/arc-folder/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc # RUN: at line 5
+ /buildbot/worker/arc-folder/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /buildbot/worker/arc-folder/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc
/buildbot/worker/arc-folder/build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | /buildbot/worker/arc-folder/build/bin/FileCheck /buildbot/worker/arc-folder/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO # RUN: at line 6
+ /buildbot/worker/arc-folder/build/bin/FileCheck /buildbot/worker/arc-folder/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
+ /buildbot/worker/arc-folder/build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv
/buildbot/worker/arc-folder/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
                   ^
<stdin>:1:285: note: scanning from here
sycl-device-link: inputs: /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-d2me5hm5/a.spv-16d534.bc
                                                                                                                                                                                                                                                                                            ^
<stdin>:1:285: note: with "LLVMLINKOUT" equal to "/tmp/lit-tmp-d2me5hm5/a\\.spv-16d534"
sycl-device-link: inputs: /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-d2me5hm5/a.spv-16d534.bc
                                                                                                                                                                                                                                                                                            ^
<stdin>:2:49: note: possible intended match here
/buildbot/worker/arc-folder/build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64
                                                ^

Input file: <stdin>
Check file: /buildbot/worker/arc-folder/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: sycl-device-link: inputs: /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /buildbot/worker/arc-folder/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-d2me5hm5/a.spv-16d534.bc 
next:9'0                                                                                                                                                                                                                                                                                                 X error: no match found
next:9'1                                                                                                                                                                                                                                                                                                   with "LLVMLINKOUT" equal to "/tmp/lit-tmp-d2me5hm5/a\\.spv-16d534"
          2: /buildbot/worker/arc-folder/build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64 
next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:9'2                                                     ?                                                                                   possible intended match
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder clang-m68k-linux-cross running on suse-gary-m68k-cross while building clang at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/8047

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Driver/link-device-code.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
llvm-as /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/test/Driver/Inputs/SYCL/foo.ll -o /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.foo.bc # RUN: at line 1
+ llvm-as /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/test/Driver/Inputs/SYCL/foo.ll -o /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.foo.bc
llvm-as /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/test/Driver/Inputs/SYCL/bar.ll -o /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.bar.bc # RUN: at line 2
+ llvm-as /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/test/Driver/Inputs/SYCL/bar.ll -o /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.bar.bc
llvm-as /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/test/Driver/Inputs/SYCL/baz.ll -o /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.baz.bc # RUN: at line 3
+ llvm-as /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/test/Driver/Inputs/SYCL/baz.ll -o /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.baz.bc
llvm-as /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/test/Driver/Inputs/SYCL/libsycl.ll -o /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.libsycl.bc # RUN: at line 4
+ llvm-as /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/test/Driver/Inputs/SYCL/libsycl.ll -o /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.libsycl.bc
/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-sycl-linker /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.foo.bc /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.bar.bc -triple=spirv64 --dry-run -o a.spv --print-linked-module 2>&1 | /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/FileCheck /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/test/Driver/link-device-code.test --check-prefix=CHECK-SIMPLE # RUN: at line 5
+ /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-sycl-linker /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.foo.bc /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/test/Driver/Output/link-device-code.test.tmp.bar.bc -triple=spirv64 --dry-run -o a.spv --print-linked-module
+ /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/FileCheck /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang/test/Driver/link-device-code.test --check-prefix=CHECK-SIMPLE

--

********************


sarnex pushed a commit that referenced this pull request Apr 2, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
)

This should fix failures caused by
#133967
Attn: @sarnex
Thanks

Signed-off-by: Arvind Sudarsanam <[email protected]>
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Apr 2, 2025
…34125)

This should fix failures caused by
llvm/llvm-project#133967
Attn: @sarnex
Thanks

Signed-off-by: Arvind Sudarsanam <[email protected]>
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Apr 2, 2025
…#2) (#134130)

This should fix failures caused by
llvm/llvm-project#133967
Attn: @sarnex
Thanks

Signed-off-by: Arvind Sudarsanam <[email protected]>
@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-darwin running on doug-worker-3 while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/8990

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc # RUN: at line 4
+ /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc
/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc # RUN: at line 5
+ /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp -o /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc
/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/FileCheck /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO # RUN: at line 6
+ /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv
+ /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/FileCheck /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
/Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
                   ^
<stdin>:1:363: note: scanning from here
sycl-device-link: inputs: /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /var/folders/dh/qpq6gp912dd8pr2b150rqlyw0000gp/T/lit-tmp-85puqroc/a.spv-ce7ee0.bc
                                                                                                                                                                                                                                                                                                                                                                          ^
<stdin>:1:363: note: with "LLVMLINKOUT" equal to "/var/folders/dh/qpq6gp912dd8pr2b150rqlyw0000gp/T/lit-tmp-85puqroc/a\\.spv-ce7ee0"
sycl-device-link: inputs: /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /var/folders/dh/qpq6gp912dd8pr2b150rqlyw0000gp/T/lit-tmp-85puqroc/a.spv-ce7ee0.bc
                                                                                                                                                                                                                                                                                                                                                                          ^
<stdin>:2:66: note: possible intended match here
/Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64
                                                                 ^

Input file: <stdin>
Check file: /Volumes/RAMDisk/buildbot-root/x86_64-darwin/llvm-project/clang/test/Driver/clang-sycl-linker-test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: sycl-device-link: inputs: /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /var/folders/dh/qpq6gp912dd8pr2b150rqlyw0000gp/T/lit-tmp-85puqroc/a.spv-ce7ee0.bc 
next:9'0                                                                                                                                                                                                                                                                                                                                                                               X error: no match found
next:9'1                                                                                                                                                                                                                                                                                                                                                                                 with "LLVMLINKOUT" equal to "/var/folders/dh/qpq6gp912dd8pr2b150rqlyw0000gp/T/lit-tmp-85puqroc/a\\.spv-ce7ee0"
          2: /Volumes/RAMDisk/buildbot-root/x86_64-darwin/build/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64 
next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:9'2                                                                      ?                                                                                   possible intended match
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-quick running on linaro-clang-aarch64-quick while building clang at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/14771

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc # RUN: at line 4
+ /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc
/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc # RUN: at line 5
+ /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc
/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO # RUN: at line 6
+ /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv
+ /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/FileCheck /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
/home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
                   ^
<stdin>:1:325: note: scanning from here
sycl-device-link: inputs: /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-813g4os5/a.spv-ea0fe8.bc
                                                                                                                                                                                                                                                                                                                                    ^
<stdin>:1:325: note: with "LLVMLINKOUT" equal to "/tmp/lit-tmp-813g4os5/a\\.spv-ea0fe8"
sycl-device-link: inputs: /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-813g4os5/a.spv-ea0fe8.bc
                                                                                                                                                                                                                                                                                                                                    ^
<stdin>:2:69: note: possible intended match here
/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64
                                                                    ^

Input file: <stdin>
Check file: /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang/test/Driver/clang-sycl-linker-test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: sycl-device-link: inputs: /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-813g4os5/a.spv-ea0fe8.bc 
next:9'0                                                                                                                                                                                                                                                                                                                                         X error: no match found
next:9'1                                                                                                                                                                                                                                                                                                                                           with "LLVMLINKOUT" equal to "/tmp/lit-tmp-813g4os5/a\\.spv-ea0fe8"
          2: /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64 
next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:9'2                                                                         ?                                                                                   possible intended match
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 2, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-win-x-aarch64 running on as-builder-2 while building clang at step 10 "test-check-clang".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/193/builds/6724

Here is the relevant piece of the build log for the reference
Step 10 (test-check-clang) failure: Test just built components: check-clang completed (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 4
c:\buildbot\as-builder-2\x-aarch64\build\bin\clang.exe --driver-mode=g++ -emit-llvm -c -target spirv64 C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp -o C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc
# executed command: 'c:\buildbot\as-builder-2\x-aarch64\build\bin\clang.exe' --driver-mode=g++ -emit-llvm -c -target spirv64 'C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' -o 'C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc'
# RUN: at line 5
c:\buildbot\as-builder-2\x-aarch64\build\bin\clang.exe --driver-mode=g++ -emit-llvm -c -target spirv64 C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp -o C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc
# executed command: 'c:\buildbot\as-builder-2\x-aarch64\build\bin\clang.exe' --driver-mode=g++ -emit-llvm -c -target spirv64 'C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' -o 'C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc'
# RUN: at line 6
c:\buildbot\as-builder-2\x-aarch64\build\bin\clang-sycl-linker.exe --dry-run -v -triple=spirv64 C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | c:\buildbot\as-builder-2\x-aarch64\build\bin\filecheck.exe C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
# executed command: 'c:\buildbot\as-builder-2\x-aarch64\build\bin\clang-sycl-linker.exe' --dry-run -v -triple=spirv64 'C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc' 'C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc' -o a.spv
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'c:\buildbot\as-builder-2\x-aarch64\build\bin\filecheck.exe' 'C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' --check-prefix=SIMPLE-FO
# .---command stderr------------
# | C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
# | // SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
# |                    ^
# | <stdin>:1:331: note: scanning from here
# | sycl-device-link: inputs: C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\Users\buildbot\AppData\Local\Temp\lit-tmp-ld2uw4m6\a.spv-4153a3.bc
# |                                                                                                                                                                                                                                                                                                                                           ^
# | <stdin>:1:331: note: with "LLVMLINKOUT" equal to "C:\\\\Users\\\\buildbot\\\\AppData\\\\Local\\\\Temp\\\\lit-tmp-ld2uw4m6\\\\a\\.spv-4153a3"
# | sycl-device-link: inputs: C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\Users\buildbot\AppData\Local\Temp\lit-tmp-ld2uw4m6\a.spv-4153a3.bc
# |                                                                                                                                                                                                                                                                                                                                           ^
# | <stdin>:2:60: note: possible intended match here
# | c:\buildbot\as-builder-2\x-aarch64\build\bin\clang-sycl-linker.exe: error: No available targets are compatible with triple "spirv64": spirv64
# |                                                            ^
# | 
# | Input file: <stdin>
# | Check file: C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           1: sycl-device-link: inputs: C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, C:\buildbot\as-builder-2\x-aarch64\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\Users\buildbot\AppData\Local\Temp\lit-tmp-ld2uw4m6\a.spv-4153a3.bc 
# | next:9'0                                                                                                                                                                                                                                                                                                                                               X error: no match found
# | next:9'1                                                                                                                                                                                                                                                                                                                                                 with "LLVMLINKOUT" equal to "C:\\\\Users\\\\buildbot\\\\AppData\\\\Local\\\\Temp\\\\lit-tmp-ld2uw4m6\\\\a\\.spv-4153a3"
# |           2: c:\buildbot\as-builder-2\x-aarch64\build\bin\clang-sycl-linker.exe: error: No available targets are compatible with triple "spirv64": spirv64 
# | next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:9'2                                                                ?                                                                                   possible intended match
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 3, 2025

LLVM Buildbot has detected a new failure on builder clang-arm64-windows-msvc running on linaro-armv8-windows-msvc-04 while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/161/builds/5156

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 4
c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\bin\clang.exe --driver-mode=g++ -emit-llvm -c -target spirv64 C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp -o C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc
# executed command: 'c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\bin\clang.exe' --driver-mode=g++ -emit-llvm -c -target spirv64 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' -o 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc'
# RUN: at line 5
c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\bin\clang.exe --driver-mode=g++ -emit-llvm -c -target spirv64 C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp -o C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc
# executed command: 'c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\bin\clang.exe' --driver-mode=g++ -emit-llvm -c -target spirv64 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' -o 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc'
# RUN: at line 6
c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\bin\clang-sycl-linker.exe --dry-run -v -triple=spirv64 C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\bin\filecheck.exe C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
# executed command: 'c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\bin\clang-sycl-linker.exe' --dry-run -v -triple=spirv64 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc' 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc' -o a.spv
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\bin\filecheck.exe' 'C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' --check-prefix=SIMPLE-FO
# .---command stderr------------
# | C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
# | // SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
# |                    ^
# | <stdin>:1:359: note: scanning from here
# | sycl-device-link: inputs: C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\Users\tcwg\AppData\Local\Temp\lit-tmp-n0l1m3vg\a.spv-a34c78.bc
# |                                                                                                                                                                                                                                                                                                                                                                       ^
# | <stdin>:1:359: note: with "LLVMLINKOUT" equal to "C:\\\\Users\\\\tcwg\\\\AppData\\\\Local\\\\Temp\\\\lit-tmp-n0l1m3vg\\\\a\\.spv-a34c78"
# | sycl-device-link: inputs: C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\Users\tcwg\AppData\Local\Temp\lit-tmp-n0l1m3vg\a.spv-a34c78.bc
# |                                                                                                                                                                                                                                                                                                                                                                       ^
# | <stdin>:2:76: note: possible intended match here
# | c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\bin\clang-sycl-linker.exe: error: No available targets are compatible with triple "spirv64": spirv64
# |                                                                            ^
# | 
# | Input file: <stdin>
# | Check file: C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           1: sycl-device-link: inputs: C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, C:\Users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\Users\tcwg\AppData\Local\Temp\lit-tmp-n0l1m3vg\a.spv-a34c78.bc 
# | next:9'0                                                                                                                                                                                                                                                                                                                                                                           X error: no match found
# | next:9'1                                                                                                                                                                                                                                                                                                                                                                             with "LLVMLINKOUT" equal to "C:\\\\Users\\\\tcwg\\\\AppData\\\\Local\\\\Temp\\\\lit-tmp-n0l1m3vg\\\\a\\.spv-a34c78"
# |           2: c:\users\tcwg\llvm-worker\clang-arm64-windows-msvc\build\bin\clang-sycl-linker.exe: error: No available targets are compatible with triple "spirv64": spirv64 
# | next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:9'2                                                                                ?                                                                                   possible intended match
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 3, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64-aix running on aix-ppc64 while building clang at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/2751

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: ClangScanDeps/verbose.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
rm -rf /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp # RUN: at line 1
+ rm -rf /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp
split-file /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp # RUN: at line 2
+ split-file /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp
sed -e "s|DIR|/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp|g" /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/cdb.json.in > /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/cdb.json # RUN: at line 3
+ sed -e 's|DIR|/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp|g' /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/cdb.json.in
/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/clang-scan-deps -compilation-database /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/cdb.json -v -o /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/result.json 2>&1 | /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/FileCheck /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test # RUN: at line 5
+ /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/clang-scan-deps -compilation-database /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/cdb.json -v -o /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/ClangScanDeps/Output/verbose.test.tmp/result.json
+ /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/build/bin/FileCheck /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test
/home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test:6:11: error: CHECK: expected string not found in input
// CHECK: *** Virtual File System Stats:
          ^
<stdin>:1:1: note: scanning from here
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
^
<stdin>:1:8: note: possible intended match here
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
       ^

Input file: <stdin>
Check file: /home/llvm/llvm-external-buildbots/workers/aix-ppc64/clang-ppc64-aix/llvm-project/clang/test/ClangScanDeps/verbose.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. 
check:6'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
check:6'1            ?                                                                                                     possible intended match
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 3, 2025

LLVM Buildbot has detected a new failure on builder clang-solaris11-sparcv9 running on solaris11-sparcv9 while building clang at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/13/builds/6357

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc # RUN: at line 4
+ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc
/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc # RUN: at line 5
+ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang --driver-mode=g++ -emit-llvm -c -target spirv64 /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Driver/clang-sycl-linker-test.cpp -o /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc
/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/FileCheck /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO # RUN: at line 6
+ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang-sycl-linker --dry-run -v -triple=spirv64 /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv
+ /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/FileCheck /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Driver/clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Driver/clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
// SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
                   ^
<stdin>:1:363: note: scanning from here
sycl-device-link: inputs: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-3c9tra5b/a.spv-81b464.bc
                                                                                                                                                                                                                                                                                                                                                                          ^
<stdin>:1:363: note: with "LLVMLINKOUT" equal to "/tmp/lit-tmp-3c9tra5b/a\\.spv-81b464"
sycl-device-link: inputs: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-3c9tra5b/a.spv-81b464.bc
                                                                                                                                                                                                                                                                                                                                                                          ^
<stdin>:2:88: note: possible intended match here
/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64
                                                                                       ^

Input file: <stdin>
Check file: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang/test/Driver/clang-sycl-linker-test.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: sycl-device-link: inputs: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_1.bc, /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/test/Driver/Output/clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: /tmp/lit-tmp-3c9tra5b/a.spv-81b464.bc 
next:9'0                                                                                                                                                                                                                                                                                                                                                                               X error: no match found
next:9'1                                                                                                                                                                                                                                                                                                                                                                                 with "LLVMLINKOUT" equal to "/tmp/lit-tmp-3c9tra5b/a\\.spv-81b464"
          2: /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/bin/clang-sycl-linker: error: No available targets are compatible with triple "spirv64": spirv64 
next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:9'2                                                                                            ?                                                                                   possible intended match
>>>>>>

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 10, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-win-x-armv7l running on as-builder-1 while building clang at step 10 "test-check-clang".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/38/builds/2834

Here is the relevant piece of the build log for the reference
Step 10 (test-check-clang) failure: Test just built components: check-clang completed (failure)
******************** TEST 'Clang :: Driver/clang-sycl-linker-test.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 4
c:\buildbot\as-builder-1\x-armv7l\build\bin\clang.exe --driver-mode=g++ -emit-llvm -c -target spirv64 C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp -o C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc
# executed command: 'c:\buildbot\as-builder-1\x-armv7l\build\bin\clang.exe' --driver-mode=g++ -emit-llvm -c -target spirv64 'C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' -o 'C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc'
# RUN: at line 5
c:\buildbot\as-builder-1\x-armv7l\build\bin\clang.exe --driver-mode=g++ -emit-llvm -c -target spirv64 C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp -o C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc
# executed command: 'c:\buildbot\as-builder-1\x-armv7l\build\bin\clang.exe' --driver-mode=g++ -emit-llvm -c -target spirv64 'C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' -o 'C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc'
# RUN: at line 6
c:\buildbot\as-builder-1\x-armv7l\build\bin\clang-sycl-linker.exe --dry-run -v -triple=spirv64 C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc -o a.spv 2>&1    | c:\buildbot\as-builder-1\x-armv7l\build\bin\filecheck.exe C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp --check-prefix=SIMPLE-FO
# executed command: 'c:\buildbot\as-builder-1\x-armv7l\build\bin\clang-sycl-linker.exe' --dry-run -v -triple=spirv64 'C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc' 'C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc' -o a.spv
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'c:\buildbot\as-builder-1\x-armv7l\build\bin\filecheck.exe' 'C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp' --check-prefix=SIMPLE-FO
# .---command stderr------------
# | C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp:9:20: error: SIMPLE-FO-NEXT: expected string not found in input
# | // SIMPLE-FO-NEXT: SPIR-V Backend: input: [[LLVMLINKOUT]].bc, output: a.spv
# |                    ^
# | <stdin>:1:332: note: scanning from here
# | sycl-device-link: inputs: C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\buildbot\as-builder-1\x-armv7l\build\lit-tmp-0tz8wfm_\a.spv-bb59d3.bc
# |                                                                                                                                                                                                                                                                                                                                            ^
# | <stdin>:1:332: note: with "LLVMLINKOUT" equal to "C:\\\\buildbot\\\\as-builder-1\\\\x-armv7l\\\\build\\\\lit-tmp-0tz8wfm_\\\\a\\.spv-bb59d3"
# | sycl-device-link: inputs: C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\buildbot\as-builder-1\x-armv7l\build\lit-tmp-0tz8wfm_\a.spv-bb59d3.bc
# |                                                                                                                                                                                                                                                                                                                                            ^
# | <stdin>:2:59: note: possible intended match here
# | c:\buildbot\as-builder-1\x-armv7l\build\bin\clang-sycl-linker.exe: error: No available targets are compatible with triple "spirv64": spirv64
# |                                                           ^
# | 
# | Input file: <stdin>
# | Check file: C:\buildbot\as-builder-1\x-armv7l\llvm-project\clang\test\Driver\clang-sycl-linker-test.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           1: sycl-device-link: inputs: C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_1.bc, C:\buildbot\as-builder-1\x-armv7l\build\tools\clang\test\Driver\Output\clang-sycl-linker-test.cpp.tmp_2.bc libfiles: output: C:\buildbot\as-builder-1\x-armv7l\build\lit-tmp-0tz8wfm_\a.spv-bb59d3.bc 
# | next:9'0                                                                                                                                                                                                                                                                                                                                                X error: no match found
# | next:9'1                                                                                                                                                                                                                                                                                                                                                  with "LLVMLINKOUT" equal to "C:\\\\buildbot\\\\as-builder-1\\\\x-armv7l\\\\build\\\\lit-tmp-0tz8wfm_\\\\a\\.spv-bb59d3"
# |           2: c:\buildbot\as-builder-1\x-armv7l\build\bin\clang-sycl-linker.exe: error: No available targets are compatible with triple "spirv64": spirv64 
# | next:9'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:9'2                                                               ?                                                                                   possible intended match
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

...

sarnex pushed a commit that referenced this pull request Apr 17, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
… SYCL offloads (#135683)

This PR is one of the many PRs in the SYCL upstreaming effort focusing
on device code linking during the SYCL offload compilation process. RFC:
https://discourse.llvm.org/t/rfc-offloading-design-for-sycl-offload-kind-and-spir-targets/74088

Approved PRs so far:
1. [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading
device code (Part 1 of many) -
[Link](#112245)
2. [clang-sycl-linker] Replace llvm-link with API calls -
[Link](#133797)
3. [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support
inside clang-sycl-linker -
[Link](#133967)

This PR adds SYCL device code linking support to clang-linker-wrapper.

### Summary for this PR

Device code linking happens inside clang-linker-wrapper. In the current
implementation, clang-linker-wrapper does the following:

1. Extracts device code. Input_1, Input_2,.....
5. Group device code according to target devices Inputs[triple_1] = ....
Inputs[triple_2] = ....
6. For each group, i.e. Inputs[triple_i], a. Gather all the offload
kinds found inside those inputs in ActiveOffloadKinds b. Link all images
inside Inputs[triple_i] by calling clang --target=triple_i .... c.
Create a copy of that linked image for each offload kind and add it to
Output[Kind] list.

In SYCL compilation flow, there is a deviation in Step 3b. We call
device code splitting inside the 'clang --target=triple_i ....' call and
the output is now a 'packaged' file containing multiple device images.
This deviation requires us to capture the OffloadKind during the linking
stage and pass it along to the linking function (clang), so that clang
can be called with a unique option '--sycl-link' that will help us to
call 'clang-sycl-linker' under the hood (clang-sycl-linker will do SYCL
specific linking).

Our current objective is to implement an end-to-end SYCL offloading flow
and get it working. We will eventually merge our approach with the
community flow.

Thanks

---------

Signed-off-by: Arvind Sudarsanam <[email protected]>
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Apr 17, 2025
…-linker for SYCL offloads (#135683)

This PR is one of the many PRs in the SYCL upstreaming effort focusing
on device code linking during the SYCL offload compilation process. RFC:
https://discourse.llvm.org/t/rfc-offloading-design-for-sycl-offload-kind-and-spir-targets/74088

Approved PRs so far:
1. [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading
device code (Part 1 of many) -
[Link](llvm/llvm-project#112245)
2. [clang-sycl-linker] Replace llvm-link with API calls -
[Link](llvm/llvm-project#133797)
3. [SYCL][SPIR-V Backend][clang-sycl-linker] Add SPIR-V backend support
inside clang-sycl-linker -
[Link](llvm/llvm-project#133967)

This PR adds SYCL device code linking support to clang-linker-wrapper.

### Summary for this PR

Device code linking happens inside clang-linker-wrapper. In the current
implementation, clang-linker-wrapper does the following:

1. Extracts device code. Input_1, Input_2,.....
5. Group device code according to target devices Inputs[triple_1] = ....
Inputs[triple_2] = ....
6. For each group, i.e. Inputs[triple_i], a. Gather all the offload
kinds found inside those inputs in ActiveOffloadKinds b. Link all images
inside Inputs[triple_i] by calling clang --target=triple_i .... c.
Create a copy of that linked image for each offload kind and add it to
Output[Kind] list.

In SYCL compilation flow, there is a deviation in Step 3b. We call
device code splitting inside the 'clang --target=triple_i ....' call and
the output is now a 'packaged' file containing multiple device images.
This deviation requires us to capture the OffloadKind during the linking
stage and pass it along to the linking function (clang), so that clang
can be called with a unique option '--sycl-link' that will help us to
call 'clang-sycl-linker' under the hood (clang-sycl-linker will do SYCL
specific linking).

Our current objective is to implement an end-to-end SYCL offloading flow
and get it working. We will eventually merge our approach with the
community flow.

Thanks

---------

Signed-off-by: Arvind Sudarsanam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants