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