Skip to content
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

Support building crate dependencies at different optimization levels #4719

Closed
jrmuizel opened this issue Nov 13, 2017 · 5 comments
Closed

Support building crate dependencies at different optimization levels #4719

jrmuizel opened this issue Nov 13, 2017 · 5 comments
Labels
A-configuration Area: cargo config files and env vars

Comments

@jrmuizel
Copy link

This is pretty commonly requested functionality, with a variety of use cases:

  1. Building all dependent crates with optimization except for one that's being debugged. This is valuable for situations where running builds with everything built at -opt-level=0 is too slow to be usable but you still need good debug info for part of the application.
  2. You can't afford to do opt-level=3 builds because of the long build time but certain crates need opt-level=3 for good codegen. This is directly affecting Gecko and WebRender. Gecko builds its rust code with opt-level=2 but we need to build the serialization code at opt-level=3. See
    https://bugzilla.mozilla.org/show_bug.cgi?id=1413285
@jrmuizel
Copy link
Author

cc @aturon

@est31
Copy link
Member

est31 commented Nov 19, 2017

This is an existing and old feature request: #1359

The small issue here that ruins all the fun is that a lot of stuff doesn't get built until it is being put into the leaf crate as it includes generics...

Currently the only way to fix this is to avoid generics altogether.

There is hope on the horizon though in the form of ThinLTO that AFAIK features incremental optimisation.

@alexcrichton alexcrichton added the A-configuration Area: cargo config files and env vars label Nov 20, 2017
@luser
Copy link
Contributor

luser commented Jan 18, 2018

@Manishearth proposed an RFC: rust-lang/rfcs#2282

@Eh2406
Copy link
Contributor

Eh2406 commented Mar 26, 2018

Move to close as dupe of #1359 and rust-lang/rfcs#2282?

@alexcrichton
Copy link
Member

Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-configuration Area: cargo config files and env vars
Projects
None yet
Development

No branches or pull requests

5 participants