https://github.com/david-salinas created https://github.com/llvm/llvm-project/pull/169551
…y is fully specified >From cf846bce512dc937c77d90f502e1be2f9d4a41ab 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/lib/Driver/ToolChains/HIPUtility.cpp b/clang/lib/Driver/ToolChains/HIPUtility.cpp index 1af2ae6470f1e..76d1fb2863a88 100644 --- a/clang/lib/Driver/ToolChains/HIPUtility.cpp +++ b/clang/lib/Driver/ToolChains/HIPUtility.cpp @@ -241,15 +241,17 @@ 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
