[PATCH] D130975: --thinlto-full-index to index both native and bitcode objects
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 2 11:17:22 PDT 2022
MaskRay added a comment.
I considered this approach. I went with D130229 <https://reviews.llvm.org/D130229> as I have thought of some minor issues:
- The requires `clang -nostdlib ...`
- An archive member cannot be serialized as `file->getName()`. Actually lld doesn't support syntax reading just an archive member instead of the whole archive. As an example, glibc `libc.so` reads `libc_nonshared.a` which contains `elf-init.oS` and the patch will incorrectly print `elf-init.oS`
- A build system needs to recognize all input files, and remove them for the final native link. This is nearly mostly feasible with Bazel/Buck style build systems, but not with others. Even in Bazel/Buck, I don't think `linkopts = ["file_added_as_an_option_instead_of_src_or_deps.o"]` can be recognized.
The above is off the top of my head.
And we lose opportunities to fix some problems for free:
- If we are to support bitcode files in archives, we will need more options.
- This still misses an opportunity to properly fix "libcall symbols defined in bitcode member of an archive".
I wish that you can give a fair consideration of D130229 <https://reviews.llvm.org/D130229> and not simply dismiss it with "it differs from in-process ThinLTO, it's not right."
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130975/new/
https://reviews.llvm.org/D130975
More information about the llvm-commits
mailing list