Skip to content

Commit 19663ca

Browse files
committed
Reject invalid codegen backends on CI
1 parent d1fc603 commit 19663ca

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • src/bootstrap/src/core/config/toml

src/bootstrap/src/core/config/toml/rust.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! This module defines the `Rust` struct, which represents the `[rust]` table
22
//! in the `bootstrap.toml` configuration file.
33
4+
use build_helper::ci::CiEnv;
45
use serde::{Deserialize, Deserializer};
56

67
use crate::core::config::toml::TomlConfig;
@@ -422,6 +423,11 @@ pub(crate) fn parse_codegen_backends(
422423
)
423424
}
424425
if !BUILTIN_CODEGEN_BACKENDS.contains(&backend.as_str()) {
426+
if CiEnv::is_rust_lang_managed_ci_job() {
427+
eprintln!("Unknown codegen backend {backend}");
428+
exit!(1);
429+
}
430+
425431
println!(
426432
"HELP: '{backend}' for '{section}.codegen-backends' might fail. \
427433
List of known codegen backends: {BUILTIN_CODEGEN_BACKENDS:?}"

0 commit comments

Comments
 (0)