Skip to content

Commit ed62c3c

Browse files
committed
some more refactoring
1 parent 3cccc1e commit ed62c3c

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

src/bootstrap/src/core/config/config.rs

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,7 @@ impl Config {
873873
None => false,
874874
};
875875

876-
let default = channel == "dev";
877-
let omit_git_hash = rust_omit_git_hash.unwrap_or(default);
876+
let omit_git_hash = rust_omit_git_hash.unwrap_or(channel == "dev");
878877

879878
rust_info = git_info(&exec_ctx, omit_git_hash, &src);
880879
let cargo_info = git_info(&exec_ctx, omit_git_hash, &src.join("src/tools/cargo"));
@@ -1317,14 +1316,6 @@ impl Config {
13171316
)
13181317
};
13191318

1320-
if rust_optimize_.as_ref().is_some_and(|v| matches!(v, RustOptimize::Bool(false))) {
1321-
eprintln!(
1322-
"WARNING: setting `optimize` to `false` is known to cause errors and \
1323-
should be considered unsupported. Refer to `bootstrap.example.toml` \
1324-
for more details."
1325-
);
1326-
}
1327-
13281319
Config {
13291320
out,
13301321
rust_info,
@@ -1363,6 +1354,12 @@ impl Config {
13631354
channel,
13641355
is_running_on_ci,
13651356
path_modification_cache,
1357+
patch_binaries_for_nix,
1358+
stage0_metadata,
1359+
download_rustc_commit,
1360+
llvm_thin_lto,
1361+
llvm_link_shared,
1362+
rustc_debug_assertions,
13661363
change_id: toml.change_id.inner,
13671364
bypass_bootstrap_lock: flags_bypass_bootstrap_lock,
13681365
ccache: match build_ccache {
@@ -1389,8 +1386,6 @@ impl Config {
13891386
compile_time_deps: flags_compile_time_deps,
13901387
test_compare_mode: rust_test_compare_mode.unwrap_or(false),
13911388
color: flags_color,
1392-
patch_binaries_for_nix,
1393-
stage0_metadata,
13941389
android_ndk: build_android_ndk,
13951390
optimized_compiler_builtins,
13961391
stdout_is_tty: std::io::stdout().is_terminal(),
@@ -1411,7 +1406,6 @@ impl Config {
14111406
incremental: flags_incremental || rust_incremental == Some(true),
14121407
dump_bootstrap_shims: flags_dump_bootstrap_shims,
14131408
free_args: flags_free_args,
1414-
download_rustc_commit,
14151409
deny_warnings: match flags_warnings {
14161410
Warnings::Deny => true,
14171411
Warnings::Warn => false,
@@ -1423,11 +1417,9 @@ impl Config {
14231417
llvm_offload: llvm_offload_.unwrap_or(false),
14241418
llvm_plugins: llvm_plugin.unwrap_or_default(),
14251419
llvm_optimize: llvm_optimize_.unwrap_or(true),
1426-
llvm_thin_lto,
14271420
llvm_release_debuginfo: llvm_release_debuginfo_.unwrap_or(false),
14281421
llvm_static_stdcpp: llvm_static_libstdcpp.unwrap_or(false),
14291422
llvm_libzstd: llvm_libzstd_.unwrap_or(false),
1430-
llvm_link_shared,
14311423
llvm_clang_cl: llvm_clang_cl_,
14321424
llvm_targets: llvm_targets_,
14331425
llvm_experimental_targets: llvm_experimental_targets_,
@@ -1455,7 +1447,6 @@ impl Config {
14551447
rust_optimize: rust_optimize_.unwrap_or(RustOptimize::Bool(true)),
14561448
rust_codegen_units: rust_codegen_units_.map(threads_from_config),
14571449
rust_codegen_units_std: rust_codegen_units_std_.map(threads_from_config),
1458-
rustc_debug_assertions,
14591450
std_debug_assertions: rust_std_debug_assertions.unwrap_or(rustc_debug_assertions),
14601451
tools_debug_assertions: rust_tools_debug_assertions.unwrap_or(rustc_debug_assertions),
14611452
rust_overflow_checks_std: rust_overflow_checks_std_.unwrap_or(rust_overflow_checks),

0 commit comments

Comments
 (0)