-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Failed to compile a project with LTO + PGO #115344
Copy link
Copy link
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-LTOArea: Link-time optimization (LTO)Area: Link-time optimization (LTO)A-PGOArea: Profile-guided optimizations (PGO)Area: Profile-guided optimizations (PGO)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-LTOArea: Link-time optimization (LTO)Area: Link-time optimization (LTO)A-PGOArea: Profile-guided optimizations (PGO)Area: Profile-guided optimizations (PGO)C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
In vectordotdev/vector#15631 (comment) I tried to optimize Vector with LTO + PGO enabled. But during the optimization phase (done with
cargo pgo optimize) I get the following error: Kobzol/cargo-pgo#32 (comment) . I am not the only person with this error - llvm/llvm-project#57501 (comment) (@kevincox probably can provide more details about they project).The only way to avoid the bug is disable LTO completely (switching from Fat to Thin mode does not help).
I expected to see this happen: Vector compiles successfully with LTO and PGO enabled.
Instead, this happened: Vector failed to compile with LTO + PGO.
Meta
rustc --version --verbose(from https://github.com/vectordotdev/vector/blob/master/rust-toolchain.toml):Other links:
cargo-pgo: LLVM ERROR: Broken module found, compilation aborted Kobzol/cargo-pgo#32