1
Fork 0

Merge commit '598f090956' into sync_cg_clif-2023-01-24

This commit is contained in:
bjorn3 2023-01-24 18:56:42 +01:00
commit b829bb7431
45 changed files with 1139 additions and 1108 deletions

View file

@ -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"))
}