[all-commits] [llvm/llvm-project] 535d69: [Clang] Extract offloading code from static libs w...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Fri Jul 11 08:26:47 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 535d6917ec3308ade866f205644b740666312342
https://github.com/llvm/llvm-project/commit/535d6917ec3308ade866f205644b740666312342
Author: Joseph Huber <huberjn at outlook.com>
Date: 2025-07-11 (Fri, 11 Jul 2025)
Changed paths:
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/test/Driver/openmp-offload-gpu.c
M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
M clang/tools/clang-linker-wrapper/LinkerWrapperOpts.td
Log Message:
-----------
[Clang] Extract offloading code from static libs with 'offload-arch=' (#147823)
Summary:
The semantics of static libraries only extract stuff that's used. We
somewhat extend this behavior with the linker wrapper only doing this to
fat binaries that match any found architectures. However, this has some
unfortunate effects when the user uses static libraries.
This is somewhat of a hack, but we now assume that if the user specified
`--offload-arch=` on the link job, they *definitely* want that
architecture to be used if it exists. This patch just forces extraction
of those libraries which resolves an issue observed with some customers.
The old behavior will still be present if the user does `--offload-link`
with no offloading architecture present, and for the vast, vast majority
of cases this will change nothing.
Fixes: https://github.com/llvm/llvm-project/issues/147788
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