Skip to content

Conversation

@Qix-
Copy link
Contributor

@Qix- Qix- commented Feb 3, 2025

Hello!

Adding a new platform target to rust-lang/rust was resulting in some hard to track errors, but I finally figured out it had to do with the generated list here. Adding them manually to the generated output in a fork is of course possible but I also added a means of passing in a path to rustc, e.g. from one of the bootstrap stages, to automatically update the target list.

Might be useful for those who are trying to get a fork up and running without manually editing generated stuff.

Copy link
Contributor

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm mostly indifferent on this, will let @NobodyXu decide.

I do think there's value in the code currently, since it forces users to have +nightly and +$MSRV, which makes it easier for them to see what they need to do to re-generate the same as CI does. So this might also just be solvable with better docs, and the addition of a +stage1 override?

@Qix-
Copy link
Contributor Author

Qix- commented Feb 3, 2025

Having any sort of +override means that you'd have to explicitly link rustup profiles, right?

Thinking about things a bit more, I think the sort of "ideal" case is that, in cases where the compiler is bootstrapping, forking/patching isn't necessary at all, and the target list can be fetched given the bootstrapped compilers at each stage - though that's a drastically more complicated solution.

Either way, I just did this to make things a little easier and to remove human error - I know my use case is niche so it may not be the best way to do it, or even valuable to have. If the +stage1 override or something similar is preferred just let me know and I can adapt :)

Copy link
Contributor

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks LGTM

@NobodyXu NobodyXu merged commit 4990d4b into rust-lang:main Feb 4, 2025
52 checks passed
@Qix- Qix- deleted the custom-rustc branch February 4, 2025 12:56
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.

3 participants