diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 682a6f74126..b1701202511 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -79,6 +79,7 @@ pub struct Config { pub musl_root: Option, pub prefix: Option, pub codegen_tests: bool, + pub nodejs: Option, } /// Per-target configuration stored in the global configuration structure. @@ -391,6 +392,9 @@ impl Config { self.rustc = Some(PathBuf::from(value).join("bin/rustc")); self.cargo = Some(PathBuf::from(value).join("bin/cargo")); } + "CFG_NODEJS" if value.len() > 0 => { + self.nodejs = Some(PathBuf::from(value)); + } _ => {} } } diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index ae7f2e018f9..c345893954f 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -76,7 +76,7 @@ pub fn check(build: &mut Build) { need_cmd("python".as_ref()); // If a manual nodejs was added to the config, - // of if a nodejs install is detected through bootstrap.py, use it. + // of if a nodejs install is detected through config, use it. if build.config.nodejs.is_some() { need_cmd("nodejs".as_ref()) }