Fix trap instruction codegen, don't fail build with older Rust versions (#229)

This commit is contained in:
Andrzej Janik 2024-05-08 15:19:59 +02:00 committed by GitHub
parent 27c0e13677
commit f0c905db15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View file

@ -1337,9 +1337,6 @@ fn emit_int_trap(ctx: &mut EmitContext) -> Result<(), TranslateError> {
0, 0,
LLVM_UNNAMED, LLVM_UNNAMED,
); );
// llvm.trap is not a terminator,
// LLVM might fail with an unterminated basic block if we don't insert unreachable
LLVMBuildUnreachable(builder);
} }
Ok(()) Ok(())
} }

View file

@ -214,6 +214,7 @@ fn build_impl(is_debug: bool) -> Result<Workspace, DynError> {
let workspace = Workspace::open(is_debug)?; let workspace = Workspace::open(is_debug)?;
let mut command = workspace.cargo_command(); let mut command = workspace.cargo_command();
command.arg("build"); command.arg("build");
command.arg("--locked");
workspace workspace
.projects .projects
.iter() .iter()