jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, jdoerfert, tianshilei1992. Herald added subscribers: pengfei, guansong, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang.
Previously, OpenMP linking would be done explicitly in a linker stage. For `x86_64` offloading this would just use the host linker, which could be the `bfd` linker. This linker had problems linking relocations against variables with protected visibility so we force `-Bsymbolic` when linking. After the deprecation of the old offloading driver this code is no longer used and can be removed. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D136363 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 @@ -586,13 +586,6 @@ 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 @@ -586,13 +586,6 @@ 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 cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits