bootstrap/core/config/toml/
build.rs1use std::collections::HashMap;
10
11use serde::{Deserialize, Deserializer};
12
13use crate::core::config::toml::ReplaceOpt;
14use crate::core::config::{CompilerBuiltins, Merge, StringOrBool};
15use crate::{HashSet, PathBuf, define_config, exit};
16
17define_config! {
18 #[derive(Default)]
20 struct Build {
21 build: Option<String> = "build",
22 description: Option<String> = "description",
23 host: Option<Vec<String>> = "host",
24 target: Option<Vec<String>> = "target",
25 build_dir: Option<String> = "build-dir",
26 cargo: Option<PathBuf> = "cargo",
27 rustc: Option<PathBuf> = "rustc",
28 rustdoc: Option<PathBuf> = "rustdoc",
29 rustfmt: Option<PathBuf> = "rustfmt",
30 cargo_clippy: Option<PathBuf> = "cargo-clippy",
31 docs: Option<bool> = "docs",
32 compiler_docs: Option<bool> = "compiler-docs",
33 library_docs_private_items: Option<bool> = "library-docs-private-items",
34 docs_minification: Option<bool> = "docs-minification",
35 submodules: Option<bool> = "submodules",
36 gdb: Option<String> = "gdb",
37 lldb: Option<String> = "lldb",
38 nodejs: Option<String> = "nodejs",
39 npm: Option<String> = "npm", yarn: Option<String> = "yarn",
41 python: Option<String> = "python",
42 windows_rc: Option<String> = "windows-rc",
43 reuse: Option<String> = "reuse",
44 locked_deps: Option<bool> = "locked-deps",
45 vendor: Option<bool> = "vendor",
46 full_bootstrap: Option<bool> = "full-bootstrap",
47 bootstrap_cache_path: Option<PathBuf> = "bootstrap-cache-path",
48 extended: Option<bool> = "extended",
49 tools: Option<HashSet<String>> = "tools",
50 tool: Option<HashMap<String, Tool>> = "tool",
51 verbose: Option<usize> = "verbose",
52 sanitizers: Option<bool> = "sanitizers",
53 profiler: Option<bool> = "profiler",
54 cargo_native_static: Option<bool> = "cargo-native-static",
55 low_priority: Option<bool> = "low-priority",
56 configure_args: Option<Vec<String>> = "configure-args",
57 local_rebuild: Option<bool> = "local-rebuild",
58 print_step_timings: Option<bool> = "print-step-timings",
59 print_step_rusage: Option<bool> = "print-step-rusage",
60 check_stage: Option<u32> = "check-stage",
61 doc_stage: Option<u32> = "doc-stage",
62 build_stage: Option<u32> = "build-stage",
63 test_stage: Option<u32> = "test-stage",
64 install_stage: Option<u32> = "install-stage",
65 dist_stage: Option<u32> = "dist-stage",
66 bench_stage: Option<u32> = "bench-stage",
67 patch_binaries_for_nix: Option<bool> = "patch-binaries-for-nix",
68 metrics: Option<bool> = "metrics",
70 android_ndk: Option<PathBuf> = "android-ndk",
71 optimized_compiler_builtins: Option<CompilerBuiltins> = "optimized-compiler-builtins",
72 jobs: Option<u32> = "jobs",
73 compiletest_diff_tool: Option<String> = "compiletest-diff-tool",
74 compiletest_allow_stage0: Option<bool> = "compiletest-allow-stage0",
75 compiletest_use_stage0_libtest: Option<bool> = "compiletest-use-stage0-libtest",
78 tidy_extra_checks: Option<String> = "tidy-extra-checks",
79 ccache: Option<StringOrBool> = "ccache",
80 exclude: Option<Vec<PathBuf>> = "exclude",
81 }
82}
83
84define_config! {
85 #[derive(Default, Clone)]
87 struct Tool {
88 features: Option<Vec<String>> = "features",
89 }
90}