From f0c905db15b287a629b96a67c246ec6317f871a8 Mon Sep 17 00:00:00 2001 From: Andrzej Janik Date: Wed, 8 May 2024 15:19:59 +0200 Subject: [PATCH] Fix trap instruction codegen, don't fail build with older Rust versions (#229) --- ptx/src/emit.rs | 3 --- xtask/src/main.rs | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ptx/src/emit.rs b/ptx/src/emit.rs index 7388203b..e2d00d98 100644 --- a/ptx/src/emit.rs +++ b/ptx/src/emit.rs @@ -1337,9 +1337,6 @@ fn emit_int_trap(ctx: &mut EmitContext) -> Result<(), TranslateError> { 0, 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(()) } diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 3f1f224c..d47659f5 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -214,6 +214,7 @@ fn build_impl(is_debug: bool) -> Result { let workspace = Workspace::open(is_debug)?; let mut command = workspace.cargo_command(); command.arg("build"); + command.arg("--locked"); workspace .projects .iter()