-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[clang-sycl-linker] Fix flaky failure and add REQUIRES #134125
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[clang-sycl-linker] Fix flaky failure and add REQUIRES #134125
Conversation
Signed-off-by: Arvind Sudarsanam <arvind.sudarsanam@intel.com>
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Arvind Sudarsanam (asudarsa) ChangesThis should fix failures caused by #133967 Full diff: https://github.com/llvm/llvm-project/pull/134125.diff 4 Files Affected:
diff --git a/clang/test/Driver/clang-sycl-linker-test.cpp b/clang/test/Driver/clang-sycl-linker-test.cpp
index 2f860ae74e97d..c399689653784 100644
--- a/clang/test/Driver/clang-sycl-linker-test.cpp
+++ b/clang/test/Driver/clang-sycl-linker-test.cpp
@@ -1,5 +1,7 @@
// Tests the clang-sycl-linker tool.
//
+// REQUIRES: spirv-registered-target
+//
// Test the dry run of a simple case to link two input files.
// RUN: %clangxx -emit-llvm -c -target spirv64 %s -o %t_1.bc
// RUN: %clangxx -emit-llvm -c -target spirv64 %s -o %t_2.bc
diff --git a/clang/test/Driver/link-device-code.test b/clang/test/Driver/link-device-code.test
index a5f52fdb7d9ae..231f02b6560e0 100644
--- a/clang/test/Driver/link-device-code.test
+++ b/clang/test/Driver/link-device-code.test
@@ -1,3 +1,5 @@
+# REQUIRES: spirv-registered-target
+
# RUN: llvm-as %S/Inputs/SYCL/foo.ll -o %t.foo.bc
# RUN: llvm-as %S/Inputs/SYCL/bar.ll -o %t.bar.bc
# RUN: llvm-as %S/Inputs/SYCL/baz.ll -o %t.baz.bc
diff --git a/clang/test/Driver/sycl-link-spirv-target.cpp b/clang/test/Driver/sycl-link-spirv-target.cpp
index 586adae619165..24206e38ad0a7 100644
--- a/clang/test/Driver/sycl-link-spirv-target.cpp
+++ b/clang/test/Driver/sycl-link-spirv-target.cpp
@@ -1,6 +1,8 @@
// Tests the driver when linking LLVM IR bitcode files and targeting SPIR-V
// architecture.
//
+// REQUIRES: spirv-registered-target
+//
// Test that -Xlinker options are being passed to clang-sycl-linker.
// RUN: touch %t.bc
// RUN: %clangxx -### --target=spirv64 --sycl-link -Xlinker -triple=spirv64 -Xlinker --library-path=/tmp \
diff --git a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
index ab718c5a87c40..24a35b01a81a8 100644
--- a/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
+++ b/clang/tools/clang-sycl-linker/ClangSYCLLinker.cpp
@@ -282,6 +282,9 @@ static Expected<StringRef> runSPIRVCodeGen(StringRef File, const ArgList &Args,
LLVMContext &C) {
llvm::TimeTraceScope TimeScope("SPIR-V code generation");
+ if (Error Err = M->materializeAll())
+ return std::move(Err);
+
// Parse input module.
SMDiagnostic Err;
std::unique_ptr<Module> M = parseIRFile(File, Err, C);
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/181/builds/16782 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/163/builds/16384 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/19399 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/15561 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/159/builds/19340 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/16757 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/203/builds/6511 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/204/builds/5324 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/205/builds/5302 Here is the relevant piece of the build log for the reference
|
…)" This reverts commit 4688719.
i reverted, please fix and make a new pr |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/13709 Here is the relevant piece of the build log for the reference
|
…IRES" (#134127) Reverts llvm/llvm-project#134125
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/27671 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/24222 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/23721 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/2/builds/20755 Here is the relevant piece of the build log for the reference
|
This should fix failures caused by #133967
Attn: @sarnex
Thanks