about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJake Goldsborough <rjgoldsborough@gmail.com>2016-09-07 13:13:37 -0700
committerJake Goldsborough <rjgoldsborough@gmail.com>2016-09-07 13:13:37 -0700
commit7e46f2ceaa84ae7ba7143fcbe8bb3d0da2449fb4 (patch)
tree01d08254b5de64fdee4a905d39e5489a09c479ef /src/bootstrap
parent0adcf46cdf3d85e78e761fdaaa9c3fa8a69df927 (diff)
downloadrust-7e46f2ceaa84ae7ba7143fcbe8bb3d0da2449fb4.tar.gz
rust-7e46f2ceaa84ae7ba7143fcbe8bb3d0da2449fb4.zip
moving nodejs detection logic to configure and adding
a nodejs cmd sanity check
Diffstat (limited to 'src/bootstrap')
-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())
     }