-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross-compiling rustc
with LTO enabled results in error
#110296
Comments
@jyn514 sorry for pinging, are there any updates on this issue? This bug is easily reproducible, and is preventing cross compiling the toolchain with LTO enabled. |
I haven't had time to look into this, no. You can always disable LTO as a workaround. |
This problem also appears when just the vendor of the target tripple changes (i.e. |
Thank you for the additional feedback, will look into this issue in couple weeks. |
When cross-compiling with LTO=thin/fat, Cargo invokes rustc with LTO enabled even for proc-macro crates, which causes compilation to fail. See rust-lang#110296 for more information. Signed-off-by: onur-ozkan <[email protected]>
When cross-compiling with LTO=thin/fat, Cargo invokes rustc with LTO enabled even for proc-macro crates, which causes compilation to fail. See rust-lang#110296 for more information. Signed-off-by: onur-ozkan <[email protected]>
I'm trying to cross-compile the rust compiler to x86_64 on an M1 macOS machine with LTO enabled and ran into a compile error while building the stage2 compiler artifact:
I also tried cross-compiling aarch64 on an Intel Mac and ran into the same issue.
Here is the
config.toml
I used:It seems that
cargo
is enabling LTO for proc-macro crates, but only when cross-compiling?The text was updated successfully, but these errors were encountered: