use std::path::{Path, PathBuf};
use std::str::FromStr;
+use crate::builder::TaskPath;
use crate::cache::{Interned, INTERNER};
use crate::channel::GitInfo;
pub use crate::flags::Subcommand;
pub sanitizers: bool,
pub profiler: bool,
pub ignore_git: bool,
- pub exclude: Vec<PathBuf>,
+ pub exclude: Vec<TaskPath>,
pub include_default_paths: bool,
pub rustc_error_format: Option<String>,
pub json_output: bool,
pub llvm_polly: bool,
pub llvm_clang: bool,
pub llvm_from_ci: bool,
+ pub llvm_build_config: HashMap<String, String>,
pub use_lld: bool,
pub lld_enabled: bool,
polly: Option<bool>,
clang: Option<bool>,
download_ci_llvm: Option<StringOrBool>,
+ build_config: Option<HashMap<String, String>>,
}
}
let flags = Flags::parse(&args);
let mut config = Config::default_opts();
- config.exclude = flags.exclude;
+ config.exclude = flags.exclude.into_iter().map(|path| TaskPath::parse(path)).collect();
config.include_default_paths = flags.include_default_paths;
config.rustc_error_format = flags.rustc_error_format;
config.json_output = flags.json_output;
config.llvm_allow_old_toolchain = llvm.allow_old_toolchain.unwrap_or(false);
config.llvm_polly = llvm.polly.unwrap_or(false);
config.llvm_clang = llvm.clang.unwrap_or(false);
+ config.llvm_build_config = llvm.build_config.clone().unwrap_or(Default::default());
config.llvm_from_ci = match llvm.download_ci_llvm {
Some(StringOrBool::String(s)) => {
assert!(s == "if-available", "unknown option `{}` for download-ci-llvm", s);
check_ci_llvm!(llvm.allow_old_toolchain);
check_ci_llvm!(llvm.polly);
check_ci_llvm!(llvm.clang);
+ check_ci_llvm!(llvm.build_config);
check_ci_llvm!(llvm.plugins);
// CI-built LLVM can be either dynamic or static.