[all-commits] [llvm/llvm-project] 760a78: [Clang] Prevent `mlink-builtin-bitcode` from inter...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Mon Jan 27 17:31:22 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 760a786d1580d2d933664a95cf1b5273d30ccdf6
https://github.com/llvm/llvm-project/commit/760a786d1580d2d933664a95cf1b5273d30ccdf6
Author: Joseph Huber <huberjn at outlook.com>
Date: 2025-01-27 (Mon, 27 Jan 2025)
Changed paths:
M llvm/lib/Transforms/IPO/Internalize.cpp
M offload/DeviceRTL/src/Misc.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list