-
Notifications
You must be signed in to change notification settings - Fork 13k
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 support for -Ztimings
to x.py
#65088
Comments
I didn't run it against rustc, that was Alex. You have to edit |
@alexcrichton: can you give the exact steps here? I tried to do this but failed. Thanks! |
What kind of error did you run into? Here's what my rust [build]
cargo = "/Users/eric/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/cargo" And here's what the diff might look like: diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 5d586f0c461..ef01c18eaa0 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -776,7 +776,8 @@ impl<'a> Builder<'a> {
cargo
.env("CARGO_TARGET_DIR", out_dir)
.arg(cmd)
- .arg("-Zconfig-profile");
+ .arg("-Zconfig-profile")
+ .arg("-Ztimings");
let profile_var = |name: &str| {
let profile = if self.config.rust_optimize { I have nightly 2019-10-02, which seems to work. Sometimes bootstrapping won't work on the latest cargo because the bootstrap code needs updating, but it seems to be working at this point in time. |
@nnethercote oh I didn't actually add support to
and then fixed any missing env vars that the crates reported. I would expect that @ehuss's patch would work as expected, although it may also require a temporary check for |
make it possible to add args to cargo in x.py eg. make it easier to test -Ztimings for rustc cc rust-lang#65088
make it possible to add args to cargo in x.py eg. make it easier to test -Ztimings for rustc cc #65088
You can now do this with |
@nnethercote do you want more support then |
I used |
Cargo's new experimental
-Ztimings
flag is really cool. See here for sample output. It would be great to add support for this tox.py
. It would help a lot with #65031.I tried and failed to get
-Ztimings
working with rustc, according to some instructions here. One complication is that rustc normally builds with a beta version of Cargo, but-Ztimings
is nightly only.@ehuss : what steps did you take to get the rustc measurements? Thanks!
The text was updated successfully, but these errors were encountered: