llvm-project
760a786d - [Clang] Prevent `mlink-builtin-bitcode` from internalizing the RPC client (#118661)

Commit
325 days ago
[Clang] Prevent `mlink-builtin-bitcode` from internalizing the RPC client (#118661) Summary: Currently, we only use `-mlink-builtin-bitcode` for non-LTO NVIDIA compiliations. This has the problem that it will internalize the RPC client symbol which needs to be visible to the host. To counteract that, I put `retain` on it, but this also prevents optimizations on the global itself, so the passes we have that remove the symbol don't work on OpenMP anymore. This patch does the dumbest solution, adding a special string check for it in clang. Not the best solution, the runner up would be to have a clang attribute for `externally_initialized` because those can't be internalized, but that might have some unfortunate side-effects. Alternatively we could make NVIDIA compilations do LTO all the time, but that would affect some users and it's harder than I thought.
Author
Parents
Loading