pub extended: bool,
pub sanitizers: bool,
pub profiler: bool,
+ pub ignore_git: bool,
+
+ pub run_host_only: bool,
pub on_fail: Option<String>,
pub stage: Option<u32>,
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>,
}
optimize_tests: Option<bool>,
debuginfo_tests: Option<bool>,
codegen_tests: Option<bool>,
+ ignore_git: Option<bool>,
}
/// TOML representation of how each build target is configured.
cc: Option<String>,
cxx: Option<String>,
android_ndk: Option<String>,
+ crt_static: Option<bool>,
musl_root: Option<String>,
qemu_rootfs: Option<String>,
}
config.docs = true;
config.rust_rpath = true;
config.rust_codegen_units = 1;
- config.build = flags.build;
config.channel = "dev".to_string();
config.codegen_tests = true;
+ config.ignore_git = false;
config.rust_dist_src = true;
config.on_fail = flags.on_fail;
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();
let build = toml.build.clone().unwrap_or(Build::default());
set(&mut config.build, build.build.clone().map(|x| INTERNER.intern_string(x)));
+ set(&mut config.build, flags.build);
+ if config.build.is_empty() {
+ // set by bootstrap.py
+ config.build = INTERNER.intern_str(&env::var("BUILD").unwrap());
+ }
config.hosts.push(config.build.clone());
for host in build.host.iter() {
let host = INTERNER.intern_str(host);
config.targets
};
+
config.nodejs = build.nodejs.map(PathBuf::from);
config.gdb = build.gdb.map(PathBuf::from);
config.python = build.python.map(PathBuf::from);
set(&mut config.use_jemalloc, rust.use_jemalloc);
set(&mut config.backtrace, rust.backtrace);
set(&mut config.channel, rust.channel.clone());
+ set(&mut config.ignore_git, rust.ignore_git);
config.rustc_default_linker = rust.default_linker.clone();
config.rustc_default_ar = rust.default_ar.clone();
config.musl_root = rust.musl_root.clone().map(PathBuf::from);
}
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);