bootstrap/core/config/toml/
gcc.rs1use serde::{Deserialize, Deserializer};
8
9use crate::core::config::toml::ReplaceOpt;
10use crate::core::config::{GccCiMode, Merge};
11use crate::{Config, HashSet, PathBuf, define_config, exit};
12
13define_config! {
14 struct Gcc {
16 download_ci_gcc: Option<bool> = "download-ci-gcc",
17 }
18}
19
20impl Config {
21 pub fn apply_gcc_config(&mut self, toml_gcc: Option<Gcc>) {
24 if let Some(gcc) = toml_gcc {
25 self.gcc_ci_mode = match gcc.download_ci_gcc {
26 Some(value) => match value {
27 true => GccCiMode::DownloadFromCi,
28 false => GccCiMode::BuildLocally,
29 },
30 None => GccCiMode::default(),
31 };
32 }
33 }
34}