================
@@ -53,19 +53,19 @@ void AMDGCN::Linker::constructLldCommand(Compilation &C, 
const JobAction &JA,
                                          const llvm::opt::ArgList &Args) const 
{
   // Construct lld command.
   // The output from ld.lld is an HSA code object file.
-  ArgStringList LldArgs{"-flavor",
-                        "gnu",
-                        "-m",
-                        "elf64_amdgpu",
-                        "--no-undefined",
-                        "-shared",
-                        "-plugin-opt=-amdgpu-internalize-symbols"};
+  const ToolChain &TC = getToolChain();
+  LTOKind LTOMode = TC.getLTOMode(Args, Action::OFK_HIP);
+  ArgStringList LldArgs{"-flavor",        "gnu",    "-m", "elf64_amdgpu",
----------------
yxsamliu wrote:

I agree that the two linker implementations could be merged, but that is 
separate from this issue. A merged linker would still need to enable 
internalization for normal LTO to avoid performance regressions and disable it 
for this mixed non-LTO link. I explained the reason in the internalization 
thread below.

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

Reply via email to