-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Description
JSON target specs were destabilized in #150151 and #151534. However, this broke trying to build rustc itself with a JSON target spec. This is because in a few places bootstrap is manually calling
rustcwithout the ability for the user to provide additional flags (primarily,-Zunstable-optionsto enable JSON targets).There's a few different ways to fix this. One would be to change these calls to
rustcto include flags provided by the user (such asRUSTFLAGS_NOT_BOOTSTRAP). Just to keep things simple, this PR proposes to just unconditionally pass-Zunstable-options.Another consideration here is how maintainable this is. A possible improvement here would be to have a function somewhere (BootstrapCommand, TargetSelection, free function) that would handle appropriately adding the
--targetflag. For example, that's what cargo does inCompileKind::add_target_arg.
-- #152677
E-hard because this requires a lot of digging without mentoring bandwidth.