diff options
| author | bors <bors@rust-lang.org> | 2023-02-09 14:12:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-09 14:12:59 +0000 |
| commit | 8cca42a47f5d574c8f7302c98c3f918cdc772fbb (patch) | |
| tree | 539e78dca393e9cdc1b0fe857c772a6a427b7e0e /compiler/rustc_codegen_cranelift/build_system/utils.rs | |
| parent | 5919f62cf6681979cb5401d3907445f14d27ec8f (diff) | |
| parent | e25566e20b079b7eae57518768dee44fb53c8cbb (diff) | |
| download | rust-8cca42a47f5d574c8f7302c98c3f918cdc772fbb.tar.gz rust-8cca42a47f5d574c8f7302c98c3f918cdc772fbb.zip | |
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
Sync rustc_codegen_cranelift * Couple of bugfixes * A significant runtime perf improvement * Implemented sym and const support for inline asm * Improved self profile integration r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
Diffstat (limited to 'compiler/rustc_codegen_cranelift/build_system/utils.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/build_system/utils.rs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_cranelift/build_system/utils.rs b/compiler/rustc_codegen_cranelift/build_system/utils.rs index da2a94a0a4f..abc5bab4942 100644 --- a/compiler/rustc_codegen_cranelift/build_system/utils.rs +++ b/compiler/rustc_codegen_cranelift/build_system/utils.rs @@ -121,10 +121,18 @@ impl CargoProject { } #[must_use] - pub(crate) fn fetch(&self, cargo: impl AsRef<Path>, dirs: &Dirs) -> Command { + pub(crate) fn fetch( + &self, + cargo: impl AsRef<Path>, + rustc: impl AsRef<Path>, + dirs: &Dirs, + ) -> Command { let mut cmd = Command::new(cargo.as_ref()); - cmd.arg("fetch").arg("--manifest-path").arg(self.manifest_path(dirs)); + cmd.env("RUSTC", rustc.as_ref()) + .arg("fetch") + .arg("--manifest-path") + .arg(self.manifest_path(dirs)); cmd } @@ -271,5 +279,9 @@ pub(crate) fn copy_dir_recursively(from: &Path, to: &Path) { } pub(crate) fn is_ci() -> bool { - env::var("CI").as_deref() == Ok("true") + env::var("CI").is_ok() +} + +pub(crate) fn is_ci_opt() -> bool { + env::var("CI_OPT").is_ok() } |
