https://github.com/david-salinas updated 
https://github.com/llvm/llvm-project/pull/169551

>From 3766397acedecea195ac98e8e604e7541f5889af Mon Sep 17 00:00:00 2001
From: david-salinas <[email protected]>
Date: Tue, 25 Nov 2025 19:02:20 +0000
Subject: [PATCH] hipcc/ld.lld unable to link separable compilation when
 dynamic library is fully specified

---
 clang/lib/Driver/ToolChains/HIPUtility.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/HIPUtility.cpp 
b/clang/lib/Driver/ToolChains/HIPUtility.cpp
index 1af2ae6470f1e..e7eb1558d641e 100644
--- a/clang/lib/Driver/ToolChains/HIPUtility.cpp
+++ b/clang/lib/Driver/ToolChains/HIPUtility.cpp
@@ -241,15 +241,16 @@ class HIPUndefinedFatBinSymbols {
 
       bool isUndefined =
           FlagOrErr.get() & llvm::object::SymbolRef::SF_Undefined;
+      bool isHidden = FlagOrErr.get() & llvm::object::SymbolRef::SF_Hidden;
       bool isFatBinSymbol = Name.starts_with(FatBinPrefix);
       bool isGPUBinHandleSymbol = Name.starts_with(GPUBinHandlePrefix);
 
       // Handling for defined symbols
       if (!isUndefined) {
-        if (isFatBinSymbol) {
+        if ((isFatBinSymbol) && (!isHidden) {
           DefinedFatBinSymbols.insert(Name.str());
           FatBinSymbols.erase(Name.str());
-        } else if (isGPUBinHandleSymbol) {
+        } else if ((isGPUBinHandleSymbol) && (!isHidden) {
           DefinedGPUBinHandleSymbols.insert(Name.str());
           GPUBinHandleSymbols.erase(Name.str());
         }

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to