build: ignore rust-version if using RUSTC_BOOTSTRAP

This commit is contained in:
chyyran 2024-02-16 00:33:03 -05:00 committed by Ronny Chan
parent b47b27fadb
commit e622479c76

View file

@ -35,6 +35,11 @@ pub fn main() {
if profile == "debug" { "dev" } else { &profile } if profile == "debug" { "dev" } else { &profile }
)); ));
// If we're on RUSTC_BOOTSTRAP, it's likely because we're building for a package..
if env::var("RUSTC_BOOTSTRAP").is_ok() {
cmd.arg("--ignore-rust-version");
}
if let Some(target) = &args.target { if let Some(target) = &args.target {
cmd.arg(format!("--target={}", &target)); cmd.arg(format!("--target={}", &target));
} }