]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/config.rs
Add x86_64-linux-android target
[rust.git] / src / bootstrap / config.rs
index b1d1d79b9eaa3c58d4e8b4f5575f45c054a275aa..34fbc33d981afddfdc8af7662b85e2ed82a885d4 100644 (file)
@@ -23,7 +23,7 @@
 use num_cpus;
 use rustc_serialize::Decodable;
 use toml::{Parser, Decoder, Value};
-use util::push_exe_path;
+use util::{exe, push_exe_path};
 
 /// Global configuration for the entire build and/or bootstrap.
 ///
@@ -74,7 +74,6 @@ pub struct Config {
     pub rustc_default_ar: Option<String>,
     pub rust_optimize_tests: bool,
     pub rust_debuginfo_tests: bool,
-    pub rust_save_analysis: bool,
     pub rust_dist_src: bool,
 
     pub build: String,
@@ -226,7 +225,6 @@ struct Rust {
     optimize_tests: Option<bool>,
     debuginfo_tests: Option<bool>,
     codegen_tests: Option<bool>,
-    save_analysis: Option<bool>,
 }
 
 /// TOML representation of how each build target is configured.
@@ -352,7 +350,6 @@ pub fn parse(build: &str, file: Option<PathBuf>) -> Config {
             set(&mut config.rust_optimize_tests, rust.optimize_tests);
             set(&mut config.rust_debuginfo_tests, rust.debuginfo_tests);
             set(&mut config.codegen_tests, rust.codegen_tests);
-            set(&mut config.rust_save_analysis, rust.save_analysis);
             set(&mut config.rust_rpath, rust.rpath);
             set(&mut config.debug_jemalloc, rust.debug_jemalloc);
             set(&mut config.use_jemalloc, rust.use_jemalloc);
@@ -460,7 +457,6 @@ macro_rules! check {
                 ("LOCAL_REBUILD", self.local_rebuild),
                 ("NINJA", self.ninja),
                 ("CODEGEN_TESTS", self.codegen_tests),
-                ("SAVE_ANALYSIS", self.rust_save_analysis),
                 ("LOCKED_DEPS", self.locked_deps),
                 ("VENDOR", self.vendor),
                 ("FULL_BOOTSTRAP", self.full_bootstrap),
@@ -574,6 +570,12 @@ macro_rules! check {
                                      .or_insert(Target::default());
                     target.ndk = Some(parse_configure_path(value));
                 }
+                "CFG_X86_64_LINUX_ANDROID_NDK" if value.len() > 0 => {
+                    let target = "x86_64-linux-android".to_string();
+                    let target = self.target_config.entry(target)
+                                     .or_insert(Target::default());
+                    target.ndk = Some(parse_configure_path(value));
+                }
                 "CFG_LOCAL_RUST_ROOT" if value.len() > 0 => {
                     let path = parse_configure_path(value);
                     self.rustc = Some(push_exe_path(path.clone(), &["bin", "rustc"]));
@@ -584,10 +586,10 @@ macro_rules! check {
                     self.python = Some(path);
                 }
                 "CFG_ENABLE_CCACHE" if value == "1" => {
-                    self.ccache = Some("ccache".to_string());
+                    self.ccache = Some(exe("ccache", &self.build));
                 }
                 "CFG_ENABLE_SCCACHE" if value == "1" => {
-                    self.ccache = Some("sccache".to_string());
+                    self.ccache = Some(exe("sccache", &self.build));
                 }
                 "CFG_CONFIGURE_ARGS" if value.len() > 0 => {
                     self.configure_args = value.split_whitespace()