-
Notifications
You must be signed in to change notification settings - Fork 15.3k
hipcc/ld.lld unable to link separable compilation when dynamic librar… #169551
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
base: main
Are you sure you want to change the base?
hipcc/ld.lld unable to link separable compilation when dynamic librar… #169551
Conversation
|
@llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: David Salinas (david-salinas) Changes…y is fully specified Full diff: https://github.com/llvm/llvm-project/pull/169551.diff 1 Files Affected:
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());
}
|
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
cf846bc to
3766397
Compare
…y is fully specified
3766397 to
6bfbc08
Compare
Co-authored-by: Omri Mor <[email protected]>
move (!isHidden) to upper level if-statement.
🐧 Linux x64 Test Results
Failed Tests(click on a test name to see its output) ClangClang.Driver/hip-partial-link.hipIf these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the |
Is the failure related to this change? |
…y is fully specified