-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 custom profiles #2007
Comments
I do think that this was one of the original intentions of profiles (cc @wycats, @carllerche), but there's also certainly a case to be made that if there are sets of options frequently used that Cargo should bake in those profiles! (and a profiling profile does seem like something that may commonly arise). |
Yep 👍 |
I'd definitely love to have a |
I would really like to have a relwithdebinfo profile, like CMake does:
... which is really a superset of profiling, but also useful for shipping -dbg packages, etc. |
We're in a situation with Firefox where we'd like to ship our release binaries with LTO, but we want to disable it by default for local developer builds to save on build time. Unfortunately there's no straightforward way to do that. Being able to define a custom profile would be really useful here. |
I have a draft implementation here if anyone is interested. |
I'm also interested in this.. I need 2 |
I have updated my implementation and opened a pull request. #5326 |
It would be nice to be able to have a fully optimized "release/publish" profile: rust-lang/rust#47745 (comment) # The publish profile, used for `cargo build --publish`.
[profile.publish]
# (...) everything else the same as profile.release except:
lto = true # Enable full link-time optimization.
codegen-units = 1 # Use only 1 codegen-unit to enable full optimizations. |
RFC 2678 for this is opened. |
This has been implemented, closing in favor of the tracking issue #6988. |
There are 5 profiles used for various purposes, and while each is configurable, you can't make your own profile. This would be useful for defining special profiles for a specific project. I personally would find a
profiling
profile useful to be able to enable both debugging and optimisations.I propose supporting custom profiles, selected using
--profile
. The current profiles would just be predefined ones and I don't see why they couldn't be selected as well. A set of default values for the profile options will also need to be decided upon.The text was updated successfully, but these errors were encountered: