Skip to content

Commit

Permalink
Don't disable inline asm usage in compiler-builtins when the cranelif…
Browse files Browse the repository at this point in the history
…t backend is enabled

This was a leftover from when inline asm wasn't universally supported by
the cranelift backend yet. It would cause the optimized inline asm
intrinsics to be avoided for the standard library distributed with
rustup now that we build the cranelift backend by default on nightly for
several tier 1 targets.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
Author: bjorn3 <17426603+bjorn3@users.noreply.github.com>
Date:   Sat Nov 4 12:47:05 2023 +0000
  • Loading branch information
onur-ozkan committed Nov 4, 2023
1 parent 55b4945 commit 2501bb6
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,6 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car

let mut features = String::new();

// Cranelift doesn't support `asm`.
if stage != 0 && builder.config.default_codegen_backend().unwrap_or_default() == "cranelift" {
features += " compiler-builtins-no-asm";
}

if builder.no_std(target) == Some(true) {
features += " compiler-builtins-mem";
if !target.starts_with("bpf") {
Expand Down

0 comments on commit 2501bb6

Please sign in to comment.