diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-01-05 15:44:46 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-01-05 15:44:46 +0000 |
| commit | a94e2d513b8b3113ea53e5abf4403ef4e91914e3 (patch) | |
| tree | 17bf96e2103b05a754166802f73af0f3c96e1552 /compiler/rustc_codegen_cranelift/build_system/config.rs | |
| parent | dcfa38fe234de9304169afc6638e81d0dd222c06 (diff) | |
| parent | 918acafef682d0d0ca30b47de4768210417ff362 (diff) | |
| download | rust-a94e2d513b8b3113ea53e5abf4403ef4e91914e3.tar.gz rust-a94e2d513b8b3113ea53e5abf4403ef4e91914e3.zip | |
Merge commit '918acafef682d0d0ca30b47de4768210417ff362' into sync_cg_clif-2025-01-05
Diffstat (limited to 'compiler/rustc_codegen_cranelift/build_system/config.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/build_system/config.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/compiler/rustc_codegen_cranelift/build_system/config.rs b/compiler/rustc_codegen_cranelift/build_system/config.rs index ef540cf1f82..37bc4c5d782 100644 --- a/compiler/rustc_codegen_cranelift/build_system/config.rs +++ b/compiler/rustc_codegen_cranelift/build_system/config.rs @@ -33,23 +33,3 @@ pub(crate) fn get_bool(name: &str) -> bool { true } } - -pub(crate) fn get_value(name: &str) -> Option<String> { - let values = load_config_file() - .into_iter() - .filter(|(key, _)| key == name) - .map(|(_, val)| val) - .collect::<Vec<_>>(); - if values.is_empty() { - None - } else if values.len() == 1 { - if values[0].is_none() { - eprintln!("Config `{}` missing value", name); - process::exit(1); - } - values.into_iter().next().unwrap() - } else { - eprintln!("Config `{}` given multiple values: {:?}", name, values); - process::exit(1); - } -} |
