implement new x flag: --skip-std-check-if-no-download-rustc
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
99426c570e
commit
143d81362b
3 changed files with 14 additions and 0 deletions
|
|
@ -60,6 +60,13 @@ impl Step for Std {
|
|||
}
|
||||
|
||||
fn run(self, builder: &Builder<'_>) {
|
||||
if !builder.download_rustc() && builder.config.skip_std_check_if_no_download_rustc {
|
||||
eprintln!(
|
||||
"WARNING: `--skip-std-check-if-no-download-rustc` flag was passed and `rust.download-rustc` is not available. Skipping."
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
builder.require_submodule("library/stdarch", None);
|
||||
|
||||
let target = self.target;
|
||||
|
|
|
|||
|
|
@ -423,6 +423,9 @@ pub struct Config {
|
|||
|
||||
/// Cache for determining path modifications
|
||||
pub path_modification_cache: Arc<Mutex<HashMap<Vec<&'static str>, PathFreshness>>>,
|
||||
|
||||
/// Skip checking std if `rust.download-rustc` isn't available.
|
||||
pub skip_std_check_if_no_download_rustc: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
|
||||
|
|
@ -1507,6 +1510,7 @@ impl Config {
|
|||
config.enable_bolt_settings = flags.enable_bolt_settings;
|
||||
config.bypass_bootstrap_lock = flags.bypass_bootstrap_lock;
|
||||
config.is_running_on_ci = flags.ci.unwrap_or(CiEnv::is_ci());
|
||||
config.skip_std_check_if_no_download_rustc = flags.skip_std_check_if_no_download_rustc;
|
||||
|
||||
// Infer the rest of the configuration.
|
||||
|
||||
|
|
|
|||
|
|
@ -182,6 +182,9 @@ pub struct Flags {
|
|||
/// Make bootstrap to behave as it's running on the CI environment or not.
|
||||
#[arg(global = true, long, value_name = "bool")]
|
||||
pub ci: Option<bool>,
|
||||
/// Skip checking std if `rust.download-rustc` isn't available.
|
||||
#[arg(global = true, long)]
|
||||
pub skip_std_check_if_no_download_rustc: bool,
|
||||
}
|
||||
|
||||
impl Flags {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue