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

"./x.py test mir-opt --bless" no longer works #125365

Closed
RalfJung opened this issue May 21, 2024 · 4 comments · Fixed by #125369
Closed

"./x.py test mir-opt --bless" no longer works #125365

RalfJung opened this issue May 21, 2024 · 4 comments · Fixed by #125369
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

Trying to bless mir-opt tests used to work fine on my Linux box, but some recent-ish change broke that:

Testing stage1 compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu)

running 75 tests
...........................................................................

test result: ok. 75 passed; 0 failed; 0 ignored; 0 measured; 219 filtered out; finished in 267.97ms

Building stage1 library artifacts (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.07s
Testing stage1 compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)

running 75 tests
...........................................................................

test result: ok. 75 passed; 0 failed; 0 ignored; 0 measured; 219 filtered out; finished in 470.37ms

Building stage1 library artifacts (x86_64-unknown-linux-gnu -> i686-pc-windows-msvc)
    Finished `release` profile [optimized + debuginfo] target(s) in 0.07s
Testing stage1 compiletest suite=mir-opt mode=mir-opt (x86_64-unknown-linux-gnu -> i686-pc-windows-msvc)

running 75 tests
...........................................................................

test result: ok. 75 passed; 0 failed; 0 ignored; 0 measured; 219 filtered out; finished in 499.16ms



error occurred: Failed to find tool. Is `xcrun` installed?
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 21, 2024
@RalfJung
Copy link
Member Author

RalfJung commented May 21, 2024

xcrun seems to be some macOS/Apple SDK tool.

mir-opt --bless does build std for a bunch of foreign targets, but that used to work, so something must have changed, and now xcrun is required. I'm not even sure where that error comes from, Failed to find tool does not occur as a string in the Rust repository...

Cc @saethlin

@RalfJung
Copy link
Member Author

Maybe #122504 is related? xcrun appears in the discussion there, and this line here looks like it may be the one printing the error. Cc @jfgoog @NobodyXu

But this can't be a build script, right? bootstrap must be calling cc directly but then printing its errors without giving any context. Cc @rust-lang/bootstrap

@saethlin
Copy link
Member

In general, the mir-opt test setup is designed to dodge any use of the cc crate, because the whole strategy of the mir-opt tests is oriented around not needing a C toolchain.

@saethlin
Copy link
Member

I've posted a fix in #125369. It seems to work locally.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue May 21, 2024
…, r=onur-ozkan

Don't do cc detection for synthetic targets

Fixes rust-lang#125365

Synthetic targets only exist for mir-opt tests, and the mir-opt tests suite is in general designed to avoid any use of a C compiler. We don't need to do CC detection. It's unclear to me how this code didn't cause issues before.
fmease added a commit to fmease/rust that referenced this issue May 21, 2024
…, r=onur-ozkan

Don't do cc detection for synthetic targets

Fixes rust-lang#125365

Synthetic targets only exist for mir-opt tests, and the mir-opt tests suite is in general designed to avoid any use of a C compiler. We don't need to do CC detection. It's unclear to me how this code didn't cause issues before.
@saethlin saethlin added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 21, 2024
@bors bors closed this as completed in d04e2e2 May 21, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue May 21, 2024
Rollup merge of rust-lang#125369 - saethlin:synthetic-targets-dont-cc, r=onur-ozkan

Don't do cc detection for synthetic targets

Fixes rust-lang#125365

Synthetic targets only exist for mir-opt tests, and the mir-opt test suite is in general designed to avoid any use of a C compiler. We don't need to do CC detection. It's unclear to me how this code didn't cause issues before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants