[all-commits] [llvm/llvm-project] a55170: [Offload] Fix the offloading wrapper when merged m...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Wed Jan 24 11:50:47 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a551703cb5d171d24303de9d20bfdedfe46d49cf
https://github.com/llvm/llvm-project/commit/a551703cb5d171d24303de9d20bfdedfe46d49cf
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-01-24 (Wed, 24 Jan 2024)
Changed paths:
M clang/test/Driver/linker-wrapper-image.c
M llvm/lib/Frontend/Offloading/Utility.cpp
Log Message:
-----------
[Offload] Fix the offloading wrapper when merged multiple times. (#79231)
Summary:
The offloading wrapper is a object file that contains code necessary to
register offloading entries for the given runtime. Currently, we
expected only one of these to be present when we make the final
executable. However, in the case of redistributable linking with `-r` we
can end up with multiple of these being generated before finally
creating the executable.
This patch simply changes the defintiions of these globals to be
mergable. This allows multiples of these to participate in a single link
job. For ELF, we just make the dummy variable internal and used so it
sets up the section as expected. For COFF we make the entries weak_odr
so they merge to a single symbol
More information about the All-commits
mailing list