-
Notifications
You must be signed in to change notification settings - Fork 93
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
Add xargo-check
command
#267
Conversation
cc @RalfJung |
Thanks a lot! I wanted some way to make a check-only libstd build for some time but did not get around to actually work on this. However, I am not sure what the best UI is for this. Originally I envisioned that In terms of this PR, please add a test to make sure that this actually works. |
This should work, right? As long as all the metadata is there... That would be my preferred solution. If we want to go the way this PR is written now, since this doesn't produce a usable sysroot, I think it's ok if it's invoked differently from regular |
Currently, I think all arguments are forwarded to Cargo. Personally, I would prefer it if we kept it that way. |
I don't think so; even doing |
As an alternative option, what about using an env var to control this? |
No it only needs that for the host, not the target
That also seems somewhat weird to me. What about a second binary |
For our use-case (Miri), those are the same. |
I'd be fine with a second binary. To be clear, this would be invoked as |
1bc689f
to
31e02f1
Compare
cargo_mode
option to Xargo.toml
xargo-check
command
The approach looks good! I left some nits. One higher-level point: is there any point to actually run the per-project |
@RalfJung: You can already do this by running |
Oh wow, I had no idea xargo supports this. EDIT: Hm, but looks like that invokes |
You need to be in a project directly (with a |
Yes that's what I did. And it makes sense, plain |
That's strange - it works for me locally. I get the help screen when outside a project directly, but a proper built when inside the directory. I've created tests for both |
I get a build followed by the help screen. And given that there is no logic in xargo for not invoking Can you make |
@RalfJung: I've modified |
I checked this locally and
Given taht building just libstd is now an intended usecase, I don't think it is a good idea to show the cargo help screen there. |
@RalfJung: Updated |
@Aaron1011 thanks, that looks good! There are still two open comments from before though. |
@RalfJung: I've addressed your comments |
Thanks! bors r+ |
267: Add `xargo-check` command r=RalfJung a=Aaron1011 This allows configuring Xargo to run `cargo check` instead of `cargo build` Needed to support rust-lang/miri#1048 Co-authored-by: Aaron Hill <aa1ronham@gmail.com>
Build failed |
Dang, CI fails because CI itself doesn't need that feature, right? So we could |
@RalfJung: I've added the hack |
bors r+ |
267: Add `xargo-check` command r=RalfJung a=Aaron1011 This allows configuring Xargo to run `cargo check` instead of `cargo build` Needed to support rust-lang/miri#1048 Co-authored-by: Aaron Hill <aa1ronham@gmail.com>
Build failed |
Looks like that sed script doesn't work on macOS :( |
@RalfJung: I've now just using a plain |
bors r=RalfJung |
267: Add `xargo-check` command r=RalfJung a=Aaron1011 This allows configuring Xargo to run `cargo check` instead of `cargo build` Needed to support rust-lang/miri#1048 Co-authored-by: Aaron Hill <aa1ronham@gmail.com>
Build succeededAnd happy new year from bors! 🎉 |
This allows configuring Xargo to run
cargo check
instead of
cargo build
Needed to support rust-lang/miri#1048