diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-01-24 18:56:42 +0100 | 
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-01-24 18:56:42 +0100 | 
| commit | b829bb74315568e18be0426a37fadd78cd2c485a (patch) | |
| tree | c6f680ebc618e2052aea2c21644d000f4283c1e4 /compiler/rustc_codegen_cranelift/build_system/build_backend.rs | |
| parent | c8e6a9e8b6251bbc8276cb78cabe1998deecbed7 (diff) | |
| parent | 598f0909568a51de8a2d1148f55a644fd8dffad0 (diff) | |
| download | rust-b829bb74315568e18be0426a37fadd78cd2c485a.tar.gz rust-b829bb74315568e18be0426a37fadd78cd2c485a.zip | |
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
Diffstat (limited to 'compiler/rustc_codegen_cranelift/build_system/build_backend.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/build_system/build_backend.rs | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/compiler/rustc_codegen_cranelift/build_system/build_backend.rs b/compiler/rustc_codegen_cranelift/build_system/build_backend.rs index fde8ef424cc..514404305a3 100644 --- a/compiler/rustc_codegen_cranelift/build_system/build_backend.rs +++ b/compiler/rustc_codegen_cranelift/build_system/build_backend.rs @@ -5,15 +5,15 @@ use super::path::{Dirs, RelPath}; use super::rustc_info::get_file_name; use super::utils::{is_ci, CargoProject, Compiler}; -static CG_CLIF: CargoProject = CargoProject::new(&RelPath::SOURCE, "cg_clif"); +pub(crate) static CG_CLIF: CargoProject = CargoProject::new(&RelPath::SOURCE, "cg_clif"); pub(crate) fn build_backend( dirs: &Dirs, channel: &str, - host_triple: &str, + bootstrap_host_compiler: &Compiler, use_unstable_features: bool, ) -> PathBuf { - let mut cmd = CG_CLIF.build(&Compiler::host(), dirs); + let mut cmd = CG_CLIF.build(&bootstrap_host_compiler, dirs); cmd.env("CARGO_BUILD_INCREMENTAL", "true"); // Force incr comp even in release mode @@ -25,6 +25,8 @@ pub(crate) fn build_backend( // Disabling incr comp reduces cache size and incr comp doesn't save as much on CI anyway cmd.env("CARGO_BUILD_INCREMENTAL", "false"); + + cmd.env("CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS", "true"); } if use_unstable_features { @@ -46,7 +48,7 @@ pub(crate) fn build_backend( CG_CLIF .target_dir(dirs) - .join(host_triple) + .join(&bootstrap_host_compiler.triple) .join(channel) .join(get_file_name("rustc_codegen_cranelift", "dylib")) } | 
