Skip to content

Document rustc internal env vars a little bit #513

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

Merged
merged 2 commits into from
Dec 21, 2019

Conversation

@mark-i-m
Copy link
Member Author

r? @pnkfelix

@Mark-Simulacrum
Copy link
Member

Hm, I feel like it's also worth noting that 99% of the time you want to switch from running the bootstrap rustc and instead run stageN/bin/rustc or something along those lines, but that can be left for later.

@mark-i-m
Copy link
Member Author

@Mark-Simulacrum Could you explain what you mean? Do you mean directly run ./stageN/bin/rustc rather than ./x.py run ...?

@Mark-Simulacrum
Copy link
Member

Yes, I mean to directly run ./stageN/bin/rustc. I'm not sure what you mean by ./x.py run ......

@mark-i-m
Copy link
Member Author

Got it. At one point this did not work. It gave errors about environment variables... I haven't tried it recently, though.

I'm not sure what you mean by ./x.py run ......

I mean running the compiled compiler via ./x.py (e.g. ./x.py test src/test/ui/blah.rs)

@Mark-Simulacrum
Copy link
Member

If ./stageN/bin/rustc gives an error about environment variables, that usually means something is quite wrong -- or you're trying to compile e.g. librustc or libstd or something that depends on environment variables, but I imagine that's rare (and would be the same anywhere if you skip to a rustc invocation from cargo build -vv).

@mark-i-m
Copy link
Member Author

mark-i-m commented Dec 6, 2019

@Mark-Simulacrum added a note (mostly verbatim from you post)

@mark-i-m
Copy link
Member Author

mark-i-m commented Dec 6, 2019

If it looks good to you, please github-approve and merge.

@mark-i-m
Copy link
Member Author

@Mark-Simulacrum ^^^?

@Mark-Simulacrum
Copy link
Member

Oh that was referring to me! Sorry. Yes, this looks good to me...

@Mark-Simulacrum Mark-Simulacrum merged commit 3e7993a into rust-lang:master Dec 21, 2019
mark-i-m added a commit to spastorino/rustc-dev-guide that referenced this pull request Jan 2, 2020
@mark-i-m mark-i-m deleted the rustc-env-vars branch March 7, 2020 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants