Skip to content

Fix rustcflags mapping: require -Clinker-plugin-lto for -flto#1564

Merged
NobodyXu merged 8 commits intomainfrom
NobodyXu-patch-1
Sep 25, 2025
Merged

Fix rustcflags mapping: require -Clinker-plugin-lto for -flto#1564
NobodyXu merged 8 commits intomainfrom
NobodyXu-patch-1

Conversation

@NobodyXu
Copy link
Copy Markdown
Contributor

@NobodyXu NobodyXu commented Sep 23, 2025

Only when -Clto and -Clinker-plugin-lto are both specified, would we pass -flto, making sure that we won't break environments which has ar doesn't support llvm ir bitcode and linker that doesn't have llvm lto plugin.

Fixed #1463

Comment thread src/flags.rs Outdated
Comment thread src/flags.rs Outdated
@dot-asm
Copy link
Copy Markdown
Contributor

dot-asm commented Sep 24, 2025

While you're at it

"-Clinker-plugin-lto=yes",
is non-representative of reality.

@NobodyXu NobodyXu changed the title Fix rustcflags mapping: translate -Clinker-plugin-lto to -flto Fix rustcflags mapping: require -Clinker-plugin-lto for -flto Sep 24, 2025
@NobodyXu
Copy link
Copy Markdown
Contributor Author

While you're at it

"-Clinker-plugin-lto=yes",

is non-representative of reality.

Thanks, fixed

Comment thread src/flags.rs Outdated
@NobodyXu NobodyXu merged commit 9347e45 into main Sep 25, 2025
156 checks passed
@NobodyXu NobodyXu deleted the NobodyXu-patch-1 branch September 25, 2025 09:28
NobodyXu added a commit that referenced this pull request Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arguably improper -Clto -> -flto flag mapping

2 participants