-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
LTO does not work due to default rlib target, causing extremely large static build artifacts #322
Comments
Thanks for finding this. I've added that also to the GStreamer Rust tracker issue. Would it be possible to only build the rlib when the test target is selected? cargo-c should know that, right? |
Yes and yes, thank you for debugging it :) |
@Humandoodlebug When statically linking multiple LTO'd GStreamer Rust plugins, are you not running into rust-lang/rust#44322 (comment) ? |
One annoyance is that it might again require rebuilding everything twice. |
The upstream open issue is rust-lang/cargo#4611 |
Thank you for fixing this so quickly :) |
In order to fix #138,
CrateType::Lib
is always selected when building (see here). Unfortunately, this means LTO configuration is ignored (see this cargo issue), meaning our gstreamer plugins are ridiculously large, especially for static builds (hundreds of megabytes when they should be less than ten).Reverting 596c582 does fix it, however this would probably break #138.
The text was updated successfully, but these errors were encountered: