File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,15 @@ def rustc(self):
236
236
return config + '/bin/rustc' + self .exe_suffix ()
237
237
return os .path .join (self .bin_root (), "bin/rustc" + self .exe_suffix ())
238
238
239
+ def nodejs (self ):
240
+ config = self .get_toml ('nodejs' )
241
+ if config :
242
+ return config
243
+ if os .path .exists (os .path .join (self .bin_root (), "bin/nodejs" )):
244
+ return os .path .join (self .bin_root (), "bin/nodejs" + self .exe_suffix ())
245
+ elif os .path .exists (os .path .join (self .bin_root (), "bin/node" )):
246
+ return os .path .join (self .bin_root (), "bin/node" + self .exe_suffix ())
247
+
239
248
def get_string (self , line ):
240
249
start = line .find ('"' )
241
250
end = start + 1 + line [start + 1 :].find ('"' )
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ pub struct Config {
67
67
pub target : Vec < String > ,
68
68
pub rustc : Option < PathBuf > ,
69
69
pub cargo : Option < PathBuf > ,
70
+ pub nodejs : Option < PathBuf > ,
70
71
pub local_rebuild : bool ,
71
72
72
73
// libstd features
@@ -111,6 +112,7 @@ struct Build {
111
112
host : Vec < String > ,
112
113
target : Vec < String > ,
113
114
cargo : Option < String > ,
115
+ nodejs : Option < String > ,
114
116
rustc : Option < String > ,
115
117
compiler_docs : Option < bool > ,
116
118
docs : Option < bool > ,
@@ -215,6 +217,7 @@ impl Config {
215
217
}
216
218
config. rustc = build. rustc . map ( PathBuf :: from) ;
217
219
config. cargo = build. cargo . map ( PathBuf :: from) ;
220
+ config. nodejs = build. nodejs . map ( PathBuf :: from) ;
218
221
set ( & mut config. compiler_docs , build. compiler_docs ) ;
219
222
set ( & mut config. docs , build. docs ) ;
220
223
You can’t perform that action at this time.
0 commit comments