File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ pub struct Config {
6565 pub build : String ,
6666 pub host : Vec < String > ,
6767 pub target : Vec < String > ,
68- pub rustc : Option < String > ,
69- pub cargo : Option < String > ,
68+ pub rustc : Option < PathBuf > ,
69+ pub cargo : Option < PathBuf > ,
7070 pub local_rebuild : bool ,
7171
7272 // libstd features
@@ -208,8 +208,8 @@ impl Config {
208208 config. target . push ( target. clone ( ) ) ;
209209 }
210210 }
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 ) ;
213213 set ( & mut config. compiler_docs , build. compiler_docs ) ;
214214 set ( & mut config. docs , build. docs ) ;
215215
@@ -379,6 +379,10 @@ impl Config {
379379 . or_insert ( Target :: default ( ) ) ;
380380 target. ndk = Some ( PathBuf :: from ( value) ) ;
381381 }
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+ }
382386 _ => { }
383387 }
384388 }
You can’t perform that action at this time.
0 commit comments