about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/config.rs4
-rw-r--r--src/bootstrap/sanity.rs2
2 files changed, 5 insertions, 1 deletions
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<PathBuf>,
     pub prefix: Option<String>,
     pub codegen_tests: bool,
+    pub nodejs: Option<PathBuf>,
 }
 
 /// 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())
     }