Skip to content

Commit 46c4d5c

Browse files
committed
remove now not required _
1 parent f960e36 commit 46c4d5c

File tree

1 file changed

+115
-115
lines changed

1 file changed

+115
-115
lines changed

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

Lines changed: 115 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -554,105 +554,105 @@ impl Config {
554554
} = toml.install.unwrap_or_default();
555555

556556
let Rust {
557-
optimize: rust_optimize_,
557+
optimize: rust_optimize,
558558
debug: rust_debug,
559-
codegen_units: rust_codegen_units_,
560-
codegen_units_std: rust_codegen_units_std_,
559+
codegen_units: rust_codegen_units,
560+
codegen_units_std: rust_codegen_units_std,
561561
rustc_debug_assertions: rust_rustc_debug_assertions,
562562
std_debug_assertions: rust_std_debug_assertions,
563563
tools_debug_assertions: rust_tools_debug_assertions,
564-
overflow_checks: rust_overflow_checks_,
565-
overflow_checks_std: rust_overflow_checks_std_,
566-
debug_logging: rust_debug_logging_,
564+
overflow_checks: rust_overflow_checks,
565+
overflow_checks_std: rust_overflow_checks_std,
566+
debug_logging: rust_debug_logging,
567567
debuginfo_level: rust_debuginfo_level,
568-
debuginfo_level_rustc: rust_debuginfo_level_rustc_,
569-
debuginfo_level_std: rust_debuginfo_level_std_,
570-
debuginfo_level_tools: rust_debuginfo_level_tools_,
571-
debuginfo_level_tests: rust_debuginfo_level_tests_,
568+
debuginfo_level_rustc: rust_debuginfo_level_rustc,
569+
debuginfo_level_std: rust_debuginfo_level_std,
570+
debuginfo_level_tools: rust_debuginfo_level_tools,
571+
debuginfo_level_tests: rust_debuginfo_level_tests,
572572
backtrace: rust_backtrace,
573573
incremental: rust_incremental,
574-
randomize_layout: rust_randomize_layout_,
574+
randomize_layout: rust_randomize_layout,
575575
default_linker: rust_default_linker,
576576
channel: rust_channel,
577577
musl_root: rust_musl_root,
578-
rpath: rust_rpath_,
578+
rpath: rust_rpath,
579579
verbose_tests: rust_verbose_tests,
580-
optimize_tests: rust_optimize_tests_,
580+
optimize_tests: rust_optimize_tests,
581581
codegen_tests: rust_codegen_tests,
582582
omit_git_hash: rust_omit_git_hash,
583-
dist_src: rust_dist_src_,
583+
dist_src: rust_dist_src,
584584
save_toolstates: rust_save_toolstates,
585-
codegen_backends: rust_codegen_backends_,
585+
codegen_backends: rust_codegen_backends,
586586
lld: rust_lld_enabled,
587587
llvm_tools: rust_llvm_tools,
588588
llvm_bitcode_linker: rust_llvm_bitcode_linker,
589589
deny_warnings: rust_deny_warnings,
590590
backtrace_on_ice: rust_backtrace_on_ice,
591-
verify_llvm_ir: rust_verify_llvm_ir_,
592-
thin_lto_import_instr_limit: rust_thin_lto_import_instr_limit_,
593-
remap_debuginfo: rust_remap_debuginfo_,
591+
verify_llvm_ir: rust_verify_llvm_ir,
592+
thin_lto_import_instr_limit: rust_thin_lto_import_instr_limit,
593+
remap_debuginfo: rust_remap_debuginfo,
594594
jemalloc: rust_jemalloc,
595595
test_compare_mode: rust_test_compare_mode,
596596
llvm_libunwind: rust_llvm_libunwind,
597597
control_flow_guard: rust_control_flow_guard,
598598
ehcont_guard: rust_ehcont_guard,
599-
new_symbol_mangling: rust_new_symbol_mangling_,
600-
profile_generate: rust_profile_generate_,
601-
profile_use: rust_profile_use_,
599+
new_symbol_mangling: rust_new_symbol_mangling,
600+
profile_generate: rust_profile_generate,
601+
profile_use: rust_profile_use,
602602
download_rustc: rust_download_rustc,
603-
lto: rust_lto_,
604-
validate_mir_opts: rust_validate_mir_opts_,
605-
frame_pointers: rust_frame_pointers_,
606-
stack_protector: rust_stack_protector_,
607-
strip: rust_strip_,
603+
lto: rust_lto,
604+
validate_mir_opts: rust_validate_mir_opts,
605+
frame_pointers: rust_frame_pointers,
606+
stack_protector: rust_stack_protector,
607+
strip: rust_strip,
608608
lld_mode: rust_lld_mode,
609-
std_features: rust_std_features_,
609+
std_features: rust_std_features,
610610
} = toml.rust.unwrap_or_default();
611611

612612
let Llvm {
613-
optimize: llvm_optimize_,
614-
thin_lto: llvm_thin_lto_,
615-
release_debuginfo: llvm_release_debuginfo_,
613+
optimize: llvm_optimize,
614+
thin_lto: llvm_thin_lto,
615+
release_debuginfo: llvm_release_debuginfo,
616616
assertions: llvm_assertions_,
617-
tests: llvm_tests_,
618-
enzyme: llvm_enzyme_,
617+
tests: llvm_tests,
618+
enzyme: llvm_enzyme,
619619
plugins: llvm_plugin,
620620
static_libstdcpp: llvm_static_libstdcpp,
621-
libzstd: llvm_libzstd_,
621+
libzstd: llvm_libzstd,
622622
ninja: llvm_ninja,
623-
targets: llvm_targets_,
624-
experimental_targets: llvm_experimental_targets_,
625-
link_jobs: llvm_link_jobs_,
623+
targets: llvm_targets,
624+
experimental_targets: llvm_experimental_targets,
625+
link_jobs: llvm_link_jobs,
626626
link_shared: llvm_link_shared_,
627-
version_suffix: llvm_version_suffix_,
628-
clang_cl: llvm_clang_cl_,
629-
cflags: llvm_cflags_,
630-
cxxflags: llvm_cxxflags_,
631-
ldflags: llvm_ldflags_,
632-
use_libcxx: llvm_use_libcxx_,
633-
use_linker: llvm_use_linker_,
634-
allow_old_toolchain: llvm_allow_old_toolchain_,
635-
offload: llvm_offload_,
636-
polly: llvm_polly_,
637-
clang: llvm_clang_,
638-
enable_warnings: llvm_enable_warnings_,
627+
version_suffix: llvm_version_suffix,
628+
clang_cl: llvm_clang_cl,
629+
cflags: llvm_cflags,
630+
cxxflags: llvm_cxxflags,
631+
ldflags: llvm_ldflags,
632+
use_libcxx: llvm_use_libcxx,
633+
use_linker: llvm_use_linker,
634+
allow_old_toolchain: llvm_allow_old_toolchain,
635+
offload: llvm_offload,
636+
polly: llvm_polly,
637+
clang: llvm_clang,
638+
enable_warnings: llvm_enable_warnings,
639639
download_ci_llvm: llvm_download_ci_llvm,
640-
build_config: llvm_build_config_,
640+
build_config: llvm_build_config,
641641
} = toml.llvm.unwrap_or_default();
642642

643643
let Dist {
644-
sign_folder: dist_sign_folder_,
645-
upload_addr: dist_upload_addr_,
646-
src_tarball: dist_src_tarball_,
647-
compression_formats: dist_compression_formats_,
648-
compression_profile: dist_compression_profile_,
649-
include_mingw_linker: dist_include_mingw_linker_,
650-
vendor: dist_vendor_,
644+
sign_folder: dist_sign_folder,
645+
upload_addr: dist_upload_addr,
646+
src_tarball: dist_src_tarball,
647+
compression_formats: dist_compression_formats,
648+
compression_profile: dist_compression_profile,
649+
include_mingw_linker: dist_include_mingw_linker,
650+
vendor: dist_vendor,
651651
} = toml.dist.unwrap_or_default();
652652

653653
let Gcc { download_ci_gcc: gcc_download_ci_gcc } = toml.gcc.unwrap_or_default();
654654

655-
if rust_optimize_.as_ref().is_some_and(|v| matches!(v, RustOptimize::Bool(false))) {
655+
if rust_optimize.as_ref().is_some_and(|v| matches!(v, RustOptimize::Bool(false))) {
656656
eprintln!(
657657
"WARNING: setting `optimize` to `false` is known to cause errors and \
658658
should be considered unsupported. Refer to `bootstrap.example.toml` \
@@ -973,7 +973,7 @@ impl Config {
973973
// config to the ones used to build the LLVM artifacts on CI, and only notify users
974974
// if they've chosen a different value.
975975

976-
if llvm_libzstd_.is_some() {
976+
if llvm_libzstd.is_some() {
977977
println!(
978978
"WARNING: when using `download-ci-llvm`, the local `llvm.libzstd` option, \
979979
like almost all `llvm.*` options, will be ignored and set by the LLVM CI \
@@ -985,7 +985,7 @@ impl Config {
985985
}
986986
}
987987

988-
if !llvm_from_ci && llvm_thin_lto_.unwrap_or(false) && llvm_link_shared_.is_none() {
988+
if !llvm_from_ci && llvm_thin_lto.unwrap_or(false) && llvm_link_shared_.is_none() {
989989
// If we're building with ThinLTO on, by default we want to link
990990
// to LLVM shared, to avoid re-doing ThinLTO (which happens in
991991
// the link step) with each stage.
@@ -1170,81 +1170,81 @@ impl Config {
11701170
Warnings::Default => rust_deny_warnings.unwrap_or(true),
11711171
},
11721172
backtrace_on_ice: rust_backtrace_on_ice.unwrap_or(false),
1173-
llvm_tests: llvm_tests_.unwrap_or_default(),
1174-
llvm_enzyme: llvm_enzyme_.unwrap_or_default(),
1175-
llvm_offload: llvm_offload_.unwrap_or(false),
1173+
llvm_tests: llvm_tests.unwrap_or_default(),
1174+
llvm_enzyme: llvm_enzyme.unwrap_or_default(),
1175+
llvm_offload: llvm_offload.unwrap_or(false),
11761176
llvm_plugins: llvm_plugin.unwrap_or_default(),
1177-
llvm_optimize: llvm_optimize_.unwrap_or(true),
1178-
llvm_release_debuginfo: llvm_release_debuginfo_.unwrap_or(false),
1177+
llvm_optimize: llvm_optimize.unwrap_or(true),
1178+
llvm_release_debuginfo: llvm_release_debuginfo.unwrap_or(false),
11791179
llvm_static_stdcpp: llvm_static_libstdcpp.unwrap_or(false),
1180-
llvm_libzstd: llvm_libzstd_.unwrap_or(false),
1181-
llvm_clang_cl: llvm_clang_cl_,
1182-
llvm_targets: llvm_targets_,
1183-
llvm_experimental_targets: llvm_experimental_targets_,
1184-
llvm_link_jobs: llvm_link_jobs_,
1185-
llvm_version_suffix: llvm_version_suffix_,
1186-
llvm_use_linker: llvm_use_linker_,
1187-
llvm_allow_old_toolchain: llvm_allow_old_toolchain_.unwrap_or(false),
1188-
llvm_polly: llvm_polly_.unwrap_or(false),
1189-
llvm_clang: llvm_clang_.unwrap_or(false),
1190-
llvm_enable_warnings: llvm_enable_warnings_.unwrap_or(false),
1191-
llvm_build_config: llvm_build_config_.clone().unwrap_or(Default::default()),
1180+
llvm_libzstd: llvm_libzstd.unwrap_or(false),
1181+
llvm_clang_cl,
1182+
llvm_targets,
1183+
llvm_experimental_targets,
1184+
llvm_link_jobs,
1185+
llvm_version_suffix,
1186+
llvm_use_linker,
1187+
llvm_allow_old_toolchain: llvm_allow_old_toolchain.unwrap_or(false),
1188+
llvm_polly: llvm_polly.unwrap_or(false),
1189+
llvm_clang: llvm_clang.unwrap_or(false),
1190+
llvm_enable_warnings: llvm_enable_warnings.unwrap_or(false),
1191+
llvm_build_config: llvm_build_config.clone().unwrap_or(Default::default()),
11921192
llvm_tools_enabled: rust_llvm_tools.unwrap_or(true),
11931193
llvm_bitcode_linker_enabled: rust_llvm_bitcode_linker.unwrap_or(false),
1194-
llvm_cflags: llvm_cflags_,
1195-
llvm_cxxflags: llvm_cxxflags_,
1196-
llvm_ldflags: llvm_ldflags_,
1197-
llvm_use_libcxx: llvm_use_libcxx_.unwrap_or(false),
1194+
llvm_cflags,
1195+
llvm_cxxflags,
1196+
llvm_ldflags,
1197+
llvm_use_libcxx: llvm_use_libcxx.unwrap_or(false),
11981198
gcc_ci_mode: match gcc_download_ci_gcc {
11991199
Some(value) => match value {
12001200
true => GccCiMode::DownloadFromCi,
12011201
false => GccCiMode::BuildLocally,
12021202
},
12031203
None => GccCiMode::default(),
12041204
},
1205-
rust_optimize: rust_optimize_.unwrap_or(RustOptimize::Bool(true)),
1206-
rust_codegen_units: rust_codegen_units_.map(threads_from_config),
1207-
rust_codegen_units_std: rust_codegen_units_std_.map(threads_from_config),
1205+
rust_optimize: rust_optimize.unwrap_or(RustOptimize::Bool(true)),
1206+
rust_codegen_units: rust_codegen_units.map(threads_from_config),
1207+
rust_codegen_units_std: rust_codegen_units_std.map(threads_from_config),
12081208
std_debug_assertions: rust_std_debug_assertions
12091209
.or(rust_rustc_debug_assertions)
12101210
.unwrap_or(rust_debug == Some(true)),
12111211
tools_debug_assertions: rust_tools_debug_assertions
12121212
.or(rust_rustc_debug_assertions)
12131213
.unwrap_or(rust_debug == Some(true)),
1214-
rust_overflow_checks_std: rust_overflow_checks_std_
1215-
.or(rust_overflow_checks_)
1214+
rust_overflow_checks_std: rust_overflow_checks_std
1215+
.or(rust_overflow_checks)
12161216
.unwrap_or(rust_debug == Some(true)),
1217-
rust_overflow_checks: rust_overflow_checks_.unwrap_or(rust_debug == Some(true)),
1218-
rust_debug_logging: rust_debug_logging_
1217+
rust_overflow_checks: rust_overflow_checks.unwrap_or(rust_debug == Some(true)),
1218+
rust_debug_logging: rust_debug_logging
12191219
.or(rust_rustc_debug_assertions)
12201220
.unwrap_or(rust_debug == Some(true)),
1221-
rust_debuginfo_level_rustc: with_defaults(rust_debuginfo_level_rustc_),
1222-
rust_debuginfo_level_std: with_defaults(rust_debuginfo_level_std_),
1223-
rust_debuginfo_level_tools: with_defaults(rust_debuginfo_level_tools_),
1224-
rust_debuginfo_level_tests: rust_debuginfo_level_tests_.unwrap_or(DebuginfoLevel::None),
1225-
rust_rpath: rust_rpath_.unwrap_or(true),
1226-
rust_strip: rust_strip_.unwrap_or(false),
1227-
rust_frame_pointers: rust_frame_pointers_.unwrap_or(false),
1228-
rust_stack_protector: rust_stack_protector_,
1221+
rust_debuginfo_level_rustc: with_defaults(rust_debuginfo_level_rustc),
1222+
rust_debuginfo_level_std: with_defaults(rust_debuginfo_level_std),
1223+
rust_debuginfo_level_tools: with_defaults(rust_debuginfo_level_tools),
1224+
rust_debuginfo_level_tests: rust_debuginfo_level_tests.unwrap_or(DebuginfoLevel::None),
1225+
rust_rpath: rust_rpath.unwrap_or(true),
1226+
rust_strip: rust_strip.unwrap_or(false),
1227+
rust_frame_pointers: rust_frame_pointers.unwrap_or(false),
1228+
rust_stack_protector,
12291229
rustc_default_linker: rust_default_linker,
1230-
rust_optimize_tests: rust_optimize_tests_.unwrap_or(true),
1231-
rust_dist_src: dist_src_tarball_.unwrap_or_else(|| rust_dist_src_.unwrap_or(true)),
1232-
rust_codegen_backends: rust_codegen_backends_
1230+
rust_optimize_tests: rust_optimize_tests.unwrap_or(true),
1231+
rust_dist_src: dist_src_tarball.unwrap_or_else(|| rust_dist_src.unwrap_or(true)),
1232+
rust_codegen_backends: rust_codegen_backends
12331233
.map(|backends| parse_codegen_backends(backends, "rust"))
12341234
.unwrap_or(vec![CodegenBackendKind::Llvm]),
1235-
rust_verify_llvm_ir: rust_verify_llvm_ir_.unwrap_or(false),
1236-
rust_thin_lto_import_instr_limit: rust_thin_lto_import_instr_limit_,
1237-
rust_randomize_layout: rust_randomize_layout_.unwrap_or_default(),
1238-
rust_remap_debuginfo: rust_remap_debuginfo_.unwrap_or(false),
1239-
rust_new_symbol_mangling: rust_new_symbol_mangling_,
1240-
rust_profile_use: flags_rust_profile_use.or(rust_profile_use_),
1241-
rust_profile_generate: flags_rust_profile_generate.or(rust_profile_generate_),
1242-
rust_lto: rust_lto_
1235+
rust_verify_llvm_ir: rust_verify_llvm_ir.unwrap_or(false),
1236+
rust_thin_lto_import_instr_limit,
1237+
rust_randomize_layout: rust_randomize_layout.unwrap_or_default(),
1238+
rust_remap_debuginfo: rust_remap_debuginfo.unwrap_or(false),
1239+
rust_new_symbol_mangling,
1240+
rust_profile_use: flags_rust_profile_use.or(rust_profile_use),
1241+
rust_profile_generate: flags_rust_profile_generate.or(rust_profile_generate),
1242+
rust_lto: rust_lto
12431243
.as_deref()
12441244
.map(|value| RustcLto::from_str(value).unwrap())
12451245
.unwrap_or_default(),
1246-
rust_validate_mir_opts: rust_validate_mir_opts_,
1247-
rust_std_features: rust_std_features_
1246+
rust_validate_mir_opts,
1247+
rust_std_features: rust_std_features
12481248
.unwrap_or(BTreeSet::from([String::from("panic-unwind")])),
12491249
llvm_profile_use: flags_llvm_profile_use,
12501250
llvm_profile_generate: flags_llvm_profile_generate,
@@ -1256,11 +1256,11 @@ impl Config {
12561256
jemalloc: rust_jemalloc.unwrap_or(false),
12571257
control_flow_guard: rust_control_flow_guard.unwrap_or(false),
12581258
ehcont_guard: rust_ehcont_guard.unwrap_or(false),
1259-
dist_sign_folder: dist_sign_folder_.map(PathBuf::from),
1260-
dist_upload_addr: dist_upload_addr_,
1261-
dist_compression_formats: dist_compression_formats_,
1262-
dist_compression_profile: dist_compression_profile_.unwrap_or("fast".into()),
1263-
dist_include_mingw_linker: dist_include_mingw_linker_.unwrap_or(true),
1259+
dist_sign_folder: dist_sign_folder.map(PathBuf::from),
1260+
dist_upload_addr,
1261+
dist_compression_formats,
1262+
dist_compression_profile: dist_compression_profile.unwrap_or("fast".into()),
1263+
dist_include_mingw_linker: dist_include_mingw_linker.unwrap_or(true),
12641264
backtrace: rust_backtrace.unwrap_or(true),
12651265
low_priority: build_low_priority.unwrap_or(false),
12661266
description: build_description,
@@ -1302,7 +1302,7 @@ impl Config {
13021302
enzyme_info: git_info(&exec_ctx, omit_git_hash, &src.join("src/tools/enzyme")),
13031303
in_tree_llvm_info: git_info(&exec_ctx, false, &src.join("src/llvm-project")),
13041304
in_tree_gcc_info: git_info(&exec_ctx, false, &src.join("src/gcc")),
1305-
dist_vendor: dist_vendor_.unwrap_or_else(|| {
1305+
dist_vendor: dist_vendor.unwrap_or_else(|| {
13061306
// If we're building from git or tarball sources, enable it by default.
13071307
rust_info.is_managed_git_subrepository() || rust_info.is_from_tarball()
13081308
}),
@@ -1332,7 +1332,7 @@ impl Config {
13321332
.collect(),
13331333
paths: flags_paths,
13341334
config: toml_path,
1335-
llvm_thin_lto: llvm_thin_lto_.unwrap_or(false),
1335+
llvm_thin_lto: llvm_thin_lto.unwrap_or(false),
13361336
rustc_debug_assertions: rust_rustc_debug_assertions.unwrap_or(rust_debug == Some(true)),
13371337
lld_mode: rust_lld_mode.unwrap_or_default(),
13381338
initial_cargo_clippy: build_cargo_clippy,

0 commit comments

Comments
 (0)