Skip to content

Commit d2ff920

Browse files
bootstrap: Don't panic if codegen-backends is set to empty
1 parent 4356e83 commit d2ff920

File tree

1 file changed

+7
-2
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+7
-2
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,8 +1849,13 @@ HELP: You can add it into `bootstrap.toml` in `rust.codegen-backends = [{name:?}
18491849
} else {
18501850
// Tells compiletest which codegen backend to use.
18511851
// It is used to e.g. ignore tests that don't support that codegen backend.
1852-
cmd.arg("--default-codegen-backend")
1853-
.arg(builder.config.default_codegen_backend(compiler.host).unwrap().name());
1852+
cmd.arg("--default-codegen-backend").arg(
1853+
builder
1854+
.config
1855+
.default_codegen_backend(compiler.host)
1856+
.unwrap_or(&CodegenBackendKind::Llvm)
1857+
.name(),
1858+
);
18541859
}
18551860

18561861
if builder.build.config.llvm_enzyme {

0 commit comments

Comments
 (0)