From c2a9839686c538eb3cf850bb8947ebfe6f28141d Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sat, 17 Jul 2021 16:40:54 +0200 Subject: [PATCH] Disable jit and inline-asm when building as part of rustc Both features are not yet ready. Inline-asm is only supported on Linux and requires explicitly specifying registers instead of register classes. The jit has usability issues and may require the cg_clif executable in the future. --- Cargo.toml | 3 ++- build_system/build_backend.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2e34717f419f..02098b135f75 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,8 @@ smallvec = "1.6.1" #gimli = { path = "../" } [features] -default = ["jit", "inline_asm"] +# Enable features not ready to be enabled when compiling as part of rustc +unstable-features = ["jit", "inline_asm"] jit = ["cranelift-jit", "libloading"] inline_asm = [] diff --git a/build_system/build_backend.rs b/build_system/build_backend.rs index 1df2bcc4541c..150b6d01a6b3 100644 --- a/build_system/build_backend.rs +++ b/build_system/build_backend.rs @@ -4,7 +4,7 @@ use std::process::Command; pub(crate) fn build_backend(channel: &str, host_triple: &str) -> PathBuf { let mut cmd = Command::new("cargo"); - cmd.arg("build").arg("--target").arg(host_triple); + cmd.arg("build").arg("--target").arg(host_triple).arg("--features").arg("unstable-features"); match channel { "debug" => {}