@@ -15,6 +15,7 @@ use std::io::prelude::*;
1515use std:: path:: PathBuf ;
1616use std:: process;
1717
18+ use build:: util:: build_path;
1819use num_cpus;
1920use rustc_serialize:: Decodable ;
2021use toml:: { Parser , Decoder , Value } ;
@@ -305,7 +306,7 @@ impl Config {
305306 . collect ( ) ;
306307 }
307308 "CFG_MUSL_ROOT" if value. len ( ) > 0 => {
308- self . musl_root = Some ( PathBuf :: from ( value) ) ;
309+ self . musl_root = Some ( build_path ( value) ) ;
309310 }
310311 "CFG_DEFAULT_AR" if value. len ( ) > 0 => {
311312 self . rustc_default_ar = Some ( value. to_string ( ) ) ;
@@ -322,31 +323,31 @@ impl Config {
322323 "CFG_LLVM_ROOT" if value. len ( ) > 0 => {
323324 let target = self . target_config . entry ( self . build . clone ( ) )
324325 . or_insert ( Target :: default ( ) ) ;
325- let root = PathBuf :: from ( value) ;
326+ let root = build_path ( value) ;
326327 target. llvm_config = Some ( root. join ( "bin/llvm-config" ) ) ;
327328 }
328329 "CFG_JEMALLOC_ROOT" if value. len ( ) > 0 => {
329330 let target = self . target_config . entry ( self . build . clone ( ) )
330331 . or_insert ( Target :: default ( ) ) ;
331- target. jemalloc = Some ( PathBuf :: from ( value) ) ;
332+ target. jemalloc = Some ( build_path ( value) ) ;
332333 }
333334 "CFG_ARM_LINUX_ANDROIDEABI_NDK" if value. len ( ) > 0 => {
334335 let target = "arm-linux-androideabi" . to_string ( ) ;
335336 let target = self . target_config . entry ( target)
336337 . or_insert ( Target :: default ( ) ) ;
337- target. ndk = Some ( PathBuf :: from ( value) ) ;
338+ target. ndk = Some ( build_path ( value) ) ;
338339 }
339340 "CFG_I686_LINUX_ANDROID_NDK" if value. len ( ) > 0 => {
340341 let target = "i686-linux-androideabi" . to_string ( ) ;
341342 let target = self . target_config . entry ( target)
342343 . or_insert ( Target :: default ( ) ) ;
343- target. ndk = Some ( PathBuf :: from ( value) ) ;
344+ target. ndk = Some ( build_path ( value) ) ;
344345 }
345346 "CFG_AARCH64_LINUX_ANDROID_NDK" if value. len ( ) > 0 => {
346347 let target = "aarch64-linux-androideabi" . to_string ( ) ;
347348 let target = self . target_config . entry ( target)
348349 . or_insert ( Target :: default ( ) ) ;
349- target. ndk = Some ( PathBuf :: from ( value) ) ;
350+ target. ndk = Some ( build_path ( value) ) ;
350351 }
351352 _ => { }
352353 }
0 commit comments