Skip to content

Commit d61b606

Browse files
committed
[DTLTO][ELF][COFF] Archive support for DTLTO - Fixed crash in lld/COFF/LTO.cpp.
1 parent 70b51bd commit d61b606

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lld/COFF/LTO.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ BitcodeCompiler::BitcodeCompiler(COFFLinkerContext &c) : ctx(c) {
133133
llvm::heavyweight_hardware_concurrency(ctx.config.thinLTOJobs));
134134
}
135135

136-
if (!ctx.config.dtltoDistributor.empty())
137-
ltoObj->Dtlto = true;
138-
139136
ltoObj = std::make_unique<lto::LTO>(createConfig(), backend,
140137
ctx.config.ltoPartitions);
138+
139+
if (!ctx.config.dtltoDistributor.empty())
140+
ltoObj->Dtlto = true;
141141
}
142142

143143
BitcodeCompiler::~BitcodeCompiler() = default;

0 commit comments

Comments
 (0)