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

extend x.py so it is easy to pass custom -Z flags when building after stage 0 #47658

Closed
nikomatsakis opened this issue Jan 22, 2018 · 4 comments
Assignees
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nikomatsakis
Copy link
Contributor

We'd like to start trying to bootstrap with -Znll enabled. From what I can tell, there is no easy way to do this at present: using RUSTFLAGS=-Znll will cause the flag to be passed to all stages, but the support for NLL in stage0 is not up to the task.

We could extend x.py to support RUSTFLAGS_STAGE{0,1,2} (which would get "copied into" the RUSTFLAGS environment when building stage 0, 1, or 2.

Or we could make some kind of flag.

It might also be nice to just support RUSTFLAGS_NOT_STAGE0 since usually that's what you want.

Or maybe there's an existing solution here?

@nikomatsakis nikomatsakis added A-build T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 22, 2018
@nikomatsakis nikomatsakis added this to the NLL: Valid code works milestone Jan 22, 2018
@kennytm kennytm added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Jan 22, 2018
@Mark-Simulacrum
Copy link
Member

So we can try to solve this generally (I know @eddyb has requested RUSTFLAGS_STAGE_N support before), which wouldn't be too hard. Alternatively, we can also make nll an option in config.toml. Which would we prefer? I'm open to either; once I hear back we can probably have an implementation up in a day at most I'd imagine.

@nikomatsakis
Copy link
Contributor Author

@Mark-Simulacrum I think I prefer RUSTFLAGS_STAGE_N. I agree it's quite easy to do. I would probably prefer to have:

  • RUSTFLAGS_STAGE_0
  • RUSTFLAGS_STAGE_1
  • RUSTFLAGS_STAGE_2
  • RUSTFLAGS_STAGE_1_OR_2 // i.e., not(stage0)

But what to call that final one I don't know. Maybe RUSTFLAGS_BOOTSTRAP? It seems like it is what you are going to want most of the time.

@eddyb
Copy link
Member

eddyb commented Jan 23, 2018

RUSTFLAGS_STAGE_NOT_0 (alternatively, RUSTFLAGS_STAGE_GT_0)

@Mark-Simulacrum Mark-Simulacrum self-assigned this Jan 24, 2018
@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Jan 24, 2018

Okay, I'll try and get an implementation of that up by the end of the week. I've assigned myself, but of course, if anyone wants to do this they are welcome to..

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jan 29, 2018
kennytm added a commit to kennytm/rust that referenced this issue Jan 29, 2018
…crichton

Add per-stage RUSTFLAGS: RUSTFLAGS_STAGE_{0,1,2} and RUSTFLAGS_STAGE_NOT_0

Fixes rust-lang#47658.

r? @alexcrichton
kennytm added a commit to kennytm/rust that referenced this issue Jan 30, 2018
…crichton

Add per-stage RUSTFLAGS: RUSTFLAGS_STAGE_{0,1,2} and RUSTFLAGS_STAGE_NOT_0

Fixes rust-lang#47658.

r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants