File tree 3 files changed +4
-38
lines changed
3 files changed +4
-38
lines changed Original file line number Diff line number Diff line change @@ -33,23 +33,3 @@ pub(crate) fn get_bool(name: &str) -> bool {
33
33
true
34
34
}
35
35
}
36
-
37
- pub ( crate ) fn get_value ( name : & str ) -> Option < String > {
38
- let values = load_config_file ( )
39
- . into_iter ( )
40
- . filter ( |( key, _) | key == name)
41
- . map ( |( _, val) | val)
42
- . collect :: < Vec < _ > > ( ) ;
43
- if values. is_empty ( ) {
44
- None
45
- } else if values. len ( ) == 1 {
46
- if values[ 0 ] . is_none ( ) {
47
- eprintln ! ( "Config `{}` missing value" , name) ;
48
- process:: exit ( 1 ) ;
49
- }
50
- values. into_iter ( ) . next ( ) . unwrap ( )
51
- } else {
52
- eprintln ! ( "Config `{}` given multiple values: {:?}" , name, values) ;
53
- process:: exit ( 1 ) ;
54
- }
55
- }
Original file line number Diff line number Diff line change @@ -156,10 +156,8 @@ fn main() {
156
156
let cargo = rustc_info:: get_cargo_path ( ) ;
157
157
let rustc = rustc_info:: get_rustc_path ( ) ;
158
158
let rustdoc = rustc_info:: get_rustdoc_path ( ) ;
159
- let triple = std:: env:: var ( "HOST_TRIPLE" )
160
- . ok ( )
161
- . or_else ( || config:: get_value ( "host" ) )
162
- . unwrap_or_else ( || rustc_info:: get_host_triple ( & rustc) ) ;
159
+ let triple =
160
+ std:: env:: var ( "HOST_TRIPLE" ) . unwrap_or_else ( |_| rustc_info:: get_host_triple ( & rustc) ) ;
163
161
Compiler {
164
162
cargo,
165
163
rustc,
@@ -170,10 +168,8 @@ fn main() {
170
168
runner : vec ! [ ] ,
171
169
}
172
170
} ;
173
- let target_triple = std:: env:: var ( "TARGET_TRIPLE" )
174
- . ok ( )
175
- . or_else ( || config:: get_value ( "target" ) )
176
- . unwrap_or_else ( || bootstrap_host_compiler. triple . clone ( ) ) ;
171
+ let target_triple =
172
+ std:: env:: var ( "TARGET_TRIPLE" ) . unwrap_or_else ( |_| bootstrap_host_compiler. triple . clone ( ) ) ;
177
173
178
174
let dirs = path:: Dirs {
179
175
source_dir : current_dir. clone ( ) ,
Original file line number Diff line number Diff line change 1
1
# This file allows configuring the build system.
2
2
3
- # Which triple to produce a compiler toolchain for.
4
- #
5
- # Defaults to the default triple of rustc on the host system.
6
- #host = x86_64-unknown-linux-gnu
7
-
8
- # Which triple to build libraries (core/alloc/std/test/proc_macro) for.
9
- #
10
- # Defaults to `host`.
11
- #target = x86_64-unknown-linux-gnu
12
-
13
3
# Disables cleaning of the sysroot dir. This will cause old compiled artifacts to be re-used when
14
4
# the sysroot source hasn't changed. This is useful when the codegen backend hasn't been modified.
15
5
# This option can be changed while the build system is already running for as long as sysroot
You can’t perform that action at this time.
0 commit comments