[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)
Tobias Hieta via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 11 08:30:12 PST 2025
================
@@ -116,7 +117,18 @@ BitcodeCompiler::BitcodeCompiler(COFFLinkerContext &c) : ctx(c) {
// Initialize ltoObj.
lto::ThinBackend backend;
- if (ctx.config.thinLTOIndexOnly) {
+ if (!ctx.config.DTLTODistributor.empty()) {
+ StringRef version = getenv("LLD_VERSION"); // For testing only.
+ if (version.empty())
+ version = ctx.saver.save(getLLDVersion());
+ backend = lto::createOutOfProcessThinBackend(
----------------
tru wrote:
When I read this code at first I was confused why it needed to have the arguments for the parallelization, I looked at the comment in LTO.h later and realized that the arguments where not used for the actual codegen, but for generating the index. But I wonder if we even need to pass that as an argument then - it reads to me like it's controlling the external process in some way.
https://github.com/llvm/llvm-project/pull/126654
More information about the cfe-commits
mailing list