File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ pub struct Config {
65
65
pub build : String ,
66
66
pub host : Vec < String > ,
67
67
pub target : Vec < String > ,
68
- pub rustc : Option < String > ,
69
- pub cargo : Option < String > ,
68
+ pub rustc : Option < PathBuf > ,
69
+ pub cargo : Option < PathBuf > ,
70
70
pub local_rebuild : bool ,
71
71
72
72
// libstd features
@@ -208,8 +208,8 @@ impl Config {
208
208
config. target . push ( target. clone ( ) ) ;
209
209
}
210
210
}
211
- config. rustc = build. rustc ;
212
- config. cargo = build. cargo ;
211
+ config. rustc = build. rustc . map ( PathBuf :: from ) ;
212
+ config. cargo = build. cargo . map ( PathBuf :: from ) ;
213
213
set ( & mut config. compiler_docs , build. compiler_docs ) ;
214
214
set ( & mut config. docs , build. docs ) ;
215
215
@@ -379,6 +379,10 @@ impl Config {
379
379
. or_insert ( Target :: default ( ) ) ;
380
380
target. ndk = Some ( PathBuf :: from ( value) ) ;
381
381
}
382
+ "CFG_LOCAL_RUST_ROOT" if value. len ( ) > 0 => {
383
+ self . rustc = Some ( PathBuf :: from ( value) . join ( "bin/rustc" ) ) ;
384
+ self . cargo = Some ( PathBuf :: from ( value) . join ( "bin/cargo" ) ) ;
385
+ }
382
386
_ => { }
383
387
}
384
388
}
You can’t perform that action at this time.
0 commit comments