about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-01-22 12:28:32 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2021-01-22 12:28:32 +0100
commitae6daf77ba9762f4f118b2342298ce5fa2e32a7a (patch)
treeb5884fda533dec6225eeb9fa2881f3e0d9cd8a9c
parent2ced8c0eb0df6ae52cfc63c88b92c70c46049178 (diff)
downloadrust-ae6daf77ba9762f4f118b2342298ce5fa2e32a7a.tar.gz
rust-ae6daf77ba9762f4f118b2342298ce5fa2e32a7a.zip
Default to Cranelift newBE
-rw-r--r--.github/workflows/main.yml2
-rw-r--r--Cargo.toml2
-rwxr-xr-xbuild.sh13
-rw-r--r--src/lib.rs6
4 files changed, 12 insertions, 11 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9eeca7c2819..20c58423a0c 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -14,7 +14,7 @@ jobs:
         os: [ubuntu-latest, macos-latest]
         env:
           - BACKEND: ""
-          - BACKEND: --features newbe
+          - BACKEND: --oldbe
 
     steps:
     - uses: actions/checkout@v2
diff --git a/Cargo.toml b/Cargo.toml
index eb9d4e09ebc..4558da2de73 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -37,7 +37,7 @@ libloading = { version = "0.6.0", optional = true }
 default = ["jit", "inline_asm"]
 jit = ["cranelift-jit", "libloading"]
 inline_asm = []
-newbe = []
+oldbe = []
 
 [profile.dev]
 # By compiling dependencies with optimizations, performing tests gets much faster.
diff --git a/build.sh b/build.sh
index a00c01a179c..522b3b3f592 100755
--- a/build.sh
+++ b/build.sh
@@ -5,7 +5,7 @@ set -e
 export CHANNEL="release"
 build_sysroot=1
 target_dir='build'
-newbe=''
+oldbe=''
 while [[ $# != 0 ]]; do
     case $1 in
         "--debug")
@@ -18,12 +18,13 @@ while [[ $# != 0 ]]; do
             target_dir=$2
             shift
             ;;
-        "--newbe")
-            newbe='--features newbe'
+        "--oldbe")
+            oldbe='--features oldbe'
             ;;
         *)
             echo "Unknown flag '$1'"
-            echo "Usage: ./build.sh [--debug] [--without-sysroot] [--target-dir DIR] [--newbe]"
+            echo "Usage: ./build.sh [--debug] [--without-sysroot] [--target-dir DIR] [--oldbe]"
+            exit 1
             ;;
     esac
     shift
@@ -43,9 +44,9 @@ else
    exit 1
 fi
 if [[ "$CHANNEL" == "release" ]]; then
-    cargo build $newbe --release
+    cargo build $oldbe --release
 else
-    cargo build $newbe
+    cargo build $oldbe
 fi
 
 rm -rf "$target_dir"
diff --git a/src/lib.rs b/src/lib.rs
index 2152d2ebdef..9b5b7d8051c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -339,10 +339,10 @@ fn build_isa(sess: &Session) -> Box<dyn isa::TargetIsa + 'static> {
 
     let flags = settings::Flags::new(flags_builder);
 
-    let variant = if cfg!(feature = "newbe") {
-        cranelift_codegen::isa::BackendVariant::MachInst
-    } else {
+    let variant = if cfg!(feature = "oldbe") {
         cranelift_codegen::isa::BackendVariant::Legacy
+    } else {
+        cranelift_codegen::isa::BackendVariant::MachInst
     };
     let mut isa_builder = cranelift_codegen::isa::lookup_variant(target_triple, variant).unwrap();
     // Don't use "haswell", as it implies `has_lzcnt`.macOS CI is still at Ivy Bridge EP, so `lzcnt`