This patch adds support for unbundling archives under a new file type 'a'.
Input file for this mode is expected to be an archive with fat object files
and outputs (one per offload target) will be archives with extracted device
specific parts from the input's objects.
Details
- Reviewers
- None
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
If this splits an archive of bundles into N archives, it presumably doesn't suffer the same implicit whole-archive semantics that result from passing code through llvm-link. That seems great.
This patch implements similar functionality to D80816/D93525 (except adding '-<device>' suffix to the target to be extracted) but it does not restrict users to specify only one target and one output file for unbundling. So, if you need to unbundle more than one target from input archive you will be able to do it in one clang-offload-bundler invocation as opposed to running clang-offload-bundler once per each target with D80816/D93525. That is probably unrelated to the whole-archive semantics when linking archives with llvm-link.
But regarding llvm-link behavior wrt archives, I assume it will be possible to link bitcode archives as libraries (i.e. link only required symbols) with –only-needed option after applying D92535.
clang-tidy: warning: 'auto &C' can be declared as 'const auto &C' [llvm-qualified-auto]
not useful