This revision was automatically updated to reflect the committed changes.
Closed by commit rGeeb29c8477d9: [OpenMP] Add -Bsymbolic to arguments for GNU
linker (authored by jhuber6).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119018/new/
https://reviews.llvm.org/D119018
Files:
clang/lib/Driver/ToolChains/Gnu.cpp
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -572,6 +572,14 @@
}
CmdArgs.push_back("-lm");
}
+
+ // If we are linking for the device all symbols should be bound locally. The
+ // symbols are already protected which makes this redundant. This is only
+ // necessary to work around a problem in bfd.
+ // TODO: Remove this once 'lld' becomes the only linker for offloading.
+ if (JA.isDeviceOffloading(Action::OFK_OpenMP))
+ CmdArgs.push_back("-Bsymbolic");
+
// Silence warnings when linking C code with a C++ '-stdlib' argument.
Args.ClaimAllArgs(options::OPT_stdlib_EQ);
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -572,6 +572,14 @@
}
CmdArgs.push_back("-lm");
}
+
+ // If we are linking for the device all symbols should be bound locally. The
+ // symbols are already protected which makes this redundant. This is only
+ // necessary to work around a problem in bfd.
+ // TODO: Remove this once 'lld' becomes the only linker for offloading.
+ if (JA.isDeviceOffloading(Action::OFK_OpenMP))
+ CmdArgs.push_back("-Bsymbolic");
+
// Silence warnings when linking C code with a C++ '-stdlib' argument.
Args.ClaimAllArgs(options::OPT_stdlib_EQ);
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits