Skip to content

Commit

Permalink
cc/lto: instr limit of 40 for explicit LTO modules
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Vashi <[email protected]>
Signed-off-by: ReveRTX <[email protected]>
  • Loading branch information
RealJohnGalt authored and ReveRTX committed May 31, 2024
1 parent e0b5907 commit 04bf332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cc/lto.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
// Reduce the inlining threshold for a better balance of binary size and
// performance.
if !ctx.Darwin() {
if ctx.isAfdoCompile() {
if ctx.isAfdoCompile() || lto.ThinLTO() {
ltoLdFlags = append(ltoLdFlags, "-Wl,-plugin-opt,-import-instr-limit=40")
} else {
ltoLdFlags = append(ltoLdFlags, "-Wl,-plugin-opt,-import-instr-limit=5")
Expand Down

0 comments on commit 04bf332

Please sign in to comment.