@@ -23,6 +23,7 @@ use std::process;
23
23
use num_cpus;
24
24
use rustc_serialize:: Decodable ;
25
25
use toml:: { Parser , Decoder , Value } ;
26
+ use util:: push_exe_path;
26
27
27
28
/// Global configuration for the entire build and/or bootstrap.
28
29
///
@@ -417,7 +418,7 @@ impl Config {
417
418
let target = self . target_config . entry ( self . build . clone ( ) )
418
419
. or_insert ( Target :: default ( ) ) ;
419
420
let root = PathBuf :: from ( value) ;
420
- target. llvm_config = Some ( root . join ( "bin/ llvm-config" ) ) ;
421
+ target. llvm_config = Some ( push_exe_path ( root , & [ "bin" , " llvm-config"] ) ) ;
421
422
}
422
423
"CFG_JEMALLOC_ROOT" if value. len ( ) > 0 => {
423
424
let target = self . target_config . entry ( self . build . clone ( ) )
@@ -449,8 +450,9 @@ impl Config {
449
450
target. ndk = Some ( PathBuf :: from ( value) ) ;
450
451
}
451
452
"CFG_LOCAL_RUST_ROOT" if value. len ( ) > 0 => {
452
- self . rustc = Some ( PathBuf :: from ( value) . join ( "bin/rustc" ) ) ;
453
- self . cargo = Some ( PathBuf :: from ( value) . join ( "bin/cargo" ) ) ;
453
+ let path = PathBuf :: from ( value) ;
454
+ self . rustc = Some ( push_exe_path ( path. clone ( ) , & [ "bin" , "rustc" ] ) ) ;
455
+ self . cargo = Some ( push_exe_path ( path, & [ "bin" , "cargo" ] ) ) ;
454
456
}
455
457
_ => { }
456
458
}
0 commit comments