llvm/0001-clang-Add-a-hack-to-fix-the-offload-build-with-the-m.patch
RHEL Packaging Agent 9cb7e1045d Rebase to LLVM 21.1.3
Successfully rebased llvm package from version 20.1.8 to 21.1.3 by
syncing from Fedora rawhide branch to CentOS c9s using the
centos-sync.sh script. All patches applied cleanly during centpkg prep,
sources were uploaded to lookaside cache, and SRPM was generated
successfully.

Resolves: RHEL-100898

This commit was created by Jotnar, a Red Hat Enterprise Linux software maintenance AI agent.

Assisted-by: Jotnar
2025-10-21 13:13:09 +00:00

28 lines
901 B
Diff

From f028fc042ef2875a13c6abf3828626a313e4a8e6 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Fri, 1 Aug 2025 15:38:22 +0000
Subject: [PATCH] clang: Add a hack to fix the offload build with the
mtls-dialect option
---
clang/lib/Driver/ToolChains/CommonArgs.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
index 097d186ad8ea..0dc9e60f8428 100644
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -920,6 +920,9 @@ bool tools::isTLSDESCEnabled(const ToolChain &TC,
} else if (Triple.isX86()) {
SupportedArgument = V == "gnu" || V == "gnu2";
EnableTLSDESC = V == "gnu2";
+ } else if( Triple.isGPU()) {
+ // HACK To fix the offload build.
+ return false;
} else {
Unsupported = true;
}
--
2.49.0