//! for example:
//!
//! ```shell
-//! $ rustc y.rs -o build/y.bin
-//! $ build/y.bin
+//! $ rustc y.rs -o y.bin
+//! $ ./y.bin
//! ```
//!
//! # Naming
mod build_backend;
#[path = "build_system/build_sysroot.rs"]
mod build_sysroot;
+#[path = "build_system/config.rs"]
+mod config;
#[path = "build_system/prepare.rs"]
mod prepare;
#[path = "build_system/rustc_info.rs"]
let host_triple = if let Ok(host_triple) = std::env::var("HOST_TRIPLE") {
host_triple
+ } else if let Some(host_triple) = crate::config::get_value("host") {
+ host_triple
} else {
rustc_info::get_host_triple()
};
} else {
host_triple.clone() // Empty target triple can happen on GHA
}
+ } else if let Some(target_triple) = crate::config::get_value("target") {
+ target_triple
} else {
host_triple.clone()
};
process::exit(1);
}
- let cg_clif_dylib = build_backend::build_backend(channel);
+ let cg_clif_build_dir = build_backend::build_backend(channel, &host_triple);
build_sysroot::build_sysroot(
channel,
sysroot_kind,
&target_dir,
- cg_clif_dylib,
+ cg_clif_build_dir,
&host_triple,
&target_triple,
);