]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/config.rs
Introduce crt_static target option in config.toml
[rust.git] / src / bootstrap / config.rs
index 3ec1c205dc0026d888d55a9c8f5acdc0a9149f55..f43035fbfe8a1a75b342fee167b2ef449e42441f 100644 (file)
@@ -56,6 +56,8 @@ pub struct Config {
     pub profiler: bool,
     pub ignore_git: bool,
 
+    pub run_host_only: bool,
+
     pub on_fail: Option<String>,
     pub stage: Option<u32>,
     pub keep_stage: Option<u32>,
@@ -141,6 +143,7 @@ pub struct Target {
     pub cc: Option<PathBuf>,
     pub cxx: Option<PathBuf>,
     pub ndk: Option<PathBuf>,
+    pub crt_static: Option<bool>,
     pub musl_root: Option<PathBuf>,
     pub qemu_rootfs: Option<PathBuf>,
 }
@@ -273,6 +276,7 @@ struct TomlTarget {
     cc: Option<String>,
     cxx: Option<String>,
     android_ndk: Option<String>,
+    crt_static: Option<bool>,
     musl_root: Option<String>,
     qemu_rootfs: Option<String>,
 }
@@ -305,6 +309,9 @@ pub fn parse(args: &[String]) -> Config {
         config.incremental = flags.incremental;
         config.keep_stage = flags.keep_stage;
 
+        // If --target was specified but --host wasn't specified, don't run any host-only tests.
+        config.run_host_only = flags.host.is_empty() && !flags.target.is_empty();
+
         let toml = file.map(|file| {
             let mut f = t!(File::open(&file));
             let mut contents = String::new();
@@ -351,6 +358,7 @@ pub fn parse(args: &[String]) -> Config {
             config.targets
         };
 
+
         config.nodejs = build.nodejs.map(PathBuf::from);
         config.gdb = build.gdb.map(PathBuf::from);
         config.python = build.python.map(PathBuf::from);
@@ -440,6 +448,7 @@ pub fn parse(args: &[String]) -> Config {
                 }
                 target.cxx = cfg.cxx.clone().map(PathBuf::from);
                 target.cc = cfg.cc.clone().map(PathBuf::from);
+                target.crt_static = cfg.crt_static.clone();
                 target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
                 target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);