-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
allow cargo --profile debug
for simpler Makefiles
#13495
Comments
If I understand, you are wanting Likely another option is to define your own profile in a config and have it inherit dev. #6790 would be another option for this. |
i just want an elegant way to use rust in makefiles, as far as i can tell, there really isn't one right now |
custom profiles and out-flag is not good enough in case you do not like adapting rust flags? cargo build --profile=myprofile --out myprofile @epage how can one use this in a project repository? or is this a personal setting? |
@soloturn sorry for the delayed repsonse. April was busy and I've still not caught up to it. I'm not entirely sure about the nature of your question. Your link doesn't seem too relevant to the conversation here. This is about being able to predict the location of final artifacts which gets more difficult for |
As for this issue, we talked about it in the Cargo team meeting and are concerned that making them alias each other could get in the way of some other debug/dev profile work we are considering, see https://blog.rust-lang.org/inside-rust/2024/12/13/this-development-cycle-in-cargo-1.84.html#improving-the-built-in-profiles As such, determining what to do with this issue is blocked until we know whether we want to do that and whether one blocks the other. As I mentioned earlier, ways around this are
|
Problem
cargo is great for simple projects, but for more complex (eg. multi-language) projects, it is often desirable to use cargo in addition to a more general build system, such as make.
however, the way cargo outputs build directories is often difficult to configure via make, usually resulting in people writing their makefiles in a way that only works with
--release
Proposed Solution
if this was implemented, configuring builds would be as simple as:
and then you could call either
make profile=release
ormake profile=debug
Notes
this already works fine for profile=release, but it throws an error when you try to build it with less optimizations:
The text was updated successfully, but these errors were encountered: