Skip to content

Commit

Permalink
Remove host and target configuration from config.txt
Browse files Browse the repository at this point in the history
They can still be set using HOST_TRIPLE and TARGET_TRIPLE.
  • Loading branch information
bjorn3 committed Dec 18, 2024
1 parent 88139f0 commit 3e59e91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
12 changes: 4 additions & 8 deletions build_system/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,8 @@ fn main() {
let cargo = rustc_info::get_cargo_path();
let rustc = rustc_info::get_rustc_path();
let rustdoc = rustc_info::get_rustdoc_path();
let triple = std::env::var("HOST_TRIPLE")
.ok()
.or_else(|| config::get_value("host"))
.unwrap_or_else(|| rustc_info::get_host_triple(&rustc));
let triple =
std::env::var("HOST_TRIPLE").unwrap_or_else(|_| rustc_info::get_host_triple(&rustc));
Compiler {
cargo,
rustc,
Expand All @@ -170,10 +168,8 @@ fn main() {
runner: vec![],
}
};
let target_triple = std::env::var("TARGET_TRIPLE")
.ok()
.or_else(|| config::get_value("target"))
.unwrap_or_else(|| bootstrap_host_compiler.triple.clone());
let target_triple =
std::env::var("TARGET_TRIPLE").unwrap_or_else(|_| bootstrap_host_compiler.triple.clone());

let dirs = path::Dirs {
source_dir: current_dir.clone(),
Expand Down
12 changes: 1 addition & 11 deletions config.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
# This file allows configuring the build system.

# Which triple to produce a compiler toolchain for.
#
# Defaults to the default triple of rustc on the host system.
#host = x86_64-unknown-linux-gnu

# Which triple to build libraries (core/alloc/std/test/proc_macro) for.
#
# Defaults to `host`.
#target = x86_64-unknown-linux-gnu

# Disables cleaning of the sysroot dir. This will cause old compiled artifacts to be re-used when
# the sysroot source hasn't changed. This is useful when the codegen backend hasn't been modified.
# This option can be changed while the build system is already running for as long as sysroot
# building hasn't started yet.
#keep_sysroot
keep_sysroot


# Testsuite
Expand Down

0 comments on commit 3e59e91

Please sign in to comment.