[clang] [Clang][Driver] Enable internalization by default for AMDGPU (PR #138365)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Sat May 3 06:31:19 PDT 2025
================
@@ -9284,6 +9284,12 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Args.MakeArgString(
"--device-linker=" + TC->getTripleString() + "=" + Arg));
+ // Enable internalization for AMDGPU.
+ if (TC->getTriple().isAMDGPU())
+ CmdArgs.push_back(
+ Args.MakeArgString("--device-linker=" + TC->getTripleString() +
+ "=-plugin-opt=-amdgpu-internalize-symbols"));
----------------
jhuber6 wrote:
Do you have an example of what kind of functions aren't being internalized? Last time I had this issue it's because the ROCm Device Libs were compiling with `-fvisibility=protected` for some reason.
https://github.com/llvm/llvm-project/pull/138365
More information about the cfe-commits
mailing list