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

Add x.py check --stage 1 #46955

Closed
Diggsey opened this issue Dec 22, 2017 · 5 comments
Closed

Add x.py check --stage 1 #46955

Diggsey opened this issue Dec 22, 2017 · 5 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@Diggsey
Copy link
Contributor

Diggsey commented Dec 22, 2017

When modifying the interface between platform-specific/non-platform-specific parts of the codebase, proper testing requires being able to build for every supported target, which is very impractical. Ideally x.py would support cargo check such that platform specific code could still be validated and type checked without needing the corresponding cross-compiling C toolchains.

This requires at least #44737 to be fixed to be useful.

@pietroalbini pietroalbini added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 30, 2018
@pietroalbini
Copy link
Member

Does #47460 do everything you wanted?

@Diggsey
Copy link
Contributor Author

Diggsey commented Jan 30, 2018

I think it would need to be extended to support stage 1 to be useful for the case I outlined above.

@pickfire
Copy link
Contributor

Is this fixed yet?

@jyn514
Copy link
Member

jyn514 commented Jan 1, 2021

I think it would need to be extended to support stage 1 to be useful for the case I outlined above.

This is sort of a hack, but you can do this by

  1. Building a stage1 compiler (x.py build --stage 1 library/std)
  2. Adding a new git worktree (git worktree add ../rust2)
  3. Setting the newly built compiler as stage 0 for the new worktree (rustc = "/path/to/rust1/build/$TARGET/stage1/bin/rustc")
  4. Running x.py check like normal.

I agree it would be great to support x.py check --stage 1 or something like that.

@jyn514 jyn514 changed the title Feature: cargo check for x.py Add x.py check --stage 1 Jan 1, 2021
@jyn514
Copy link
Member

jyn514 commented May 1, 2021

This was added in #81064.

@jyn514 jyn514 closed this as completed May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. 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.

5 participants
@Diggsey @pietroalbini @pickfire @jyn514 and others