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

Define _RUST_STAGEN when building rustrt. #6714

Merged
merged 1 commit into from
May 24, 2013

Conversation

thomaslee
Copy link
Contributor

As discussed with @brson on IRC:

This lets us use #ifdefs to determine which stage of the build we happen
to be in, which is useful in the event we need to make changes to rustrt
that are incompatible with the code generated by a stage0 rustc.

Example of the _RUST_STAGEN flag in action here: https://gist.github.com/thomaslee/5641890

I'm not sure what tests for this change should look like, so please advise if I need to do some work around that.

This lets us use #ifdefs to determine which stage of the build we happen
to be in, which is useful in the event we need to make changes to rustrt
that are incompatible with the code generated by stage0.

This should help pave the way to completing rust-lang#6575, which will likely
require changes to type signatures for spawn_fn & glue_fn in rustrt.
@brson
Copy link
Contributor

brson commented May 24, 2013

Oh, wow. It didn't occur to me that we only build rt in one stage. This is a bigger task than I thought.

@brson
Copy link
Contributor

brson commented May 24, 2013

I think this is probably the cleanest way to do this, since it makes the rt build like the rest of the libraries, but it is going to increase build times.

We used to have a flag in the makefiles called USE_SNAPSHOT_RT (removed in e343abd) that we removed because it was no longer being used. That flag was used to make this sort of change by reusing the snapshot rt, core and/or std libraries in stage0.

@brson
Copy link
Contributor

brson commented May 24, 2013

@catamorphism What do you think of this?

@catamorphism
Copy link
Contributor

@brson How much of an increase in build times do you think it will be? IME, the runtime doesn't take very long to build compared to the compiler and libraries.

@brson
Copy link
Contributor

brson commented May 24, 2013

@catamorphism Yeah, it shouldn't be that much, and it's parallelizable.

bors added a commit that referenced this pull request May 24, 2013
As discussed with @brson on IRC:

This lets us use #ifdefs to determine which stage of the build we happen
to be in, which is useful in the event we need to make changes to rustrt
that are incompatible with the code generated by a stage0 rustc.

Example of the _RUST_STAGEN flag in action here: https://gist.github.com/thomaslee/5641890

I'm not sure what tests for this change should look like, so please advise if I need to do some work around that.
@bors bors closed this May 24, 2013
@bors bors merged commit e69e809 into rust-lang:incoming May 24, 2013
@thomaslee thomaslee deleted the rustrt-stage branch May 25, 2013 22:29
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 11, 2021
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.

4 participants