This commit is contained in:
klensy 2024-02-06 12:44:40 +03:00
parent 2a06b69ba2
commit ca35cfb6de

View File

@ -934,10 +934,8 @@ LLVMRustOptimize(
} else {
for (const auto &C : PipelineStartEPCallbacks)
PB.registerPipelineStartEPCallback(C);
if (OptStage != LLVMRustOptStage::PreLinkThinLTO) {
for (const auto &C : OptimizerLastEPCallbacks)
PB.registerOptimizerLastEPCallback(C);
}
switch (OptStage) {
case LLVMRustOptStage::PreLinkNoLTO:
@ -946,8 +944,6 @@ LLVMRustOptimize(
case LLVMRustOptStage::PreLinkThinLTO:
MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel);
NeedThinLTOBufferPasses = false;
for (const auto &C : OptimizerLastEPCallbacks)
C(MPM, OptLevel);
break;
case LLVMRustOptStage::PreLinkFatLTO:
MPM = PB.buildLTOPreLinkDefaultPipeline(OptLevel);