diff --git a/mozjs-sys/Cargo.toml b/mozjs-sys/Cargo.toml index cdec66750e..35d9831639 100644 --- a/mozjs-sys/Cargo.toml +++ b/mozjs-sys/Cargo.toml @@ -2,7 +2,7 @@ name = "mozjs_sys" description = "System crate for the Mozilla SpiderMonkey JavaScript engine." repository.workspace = true -version = "0.128.13-0" +version = "0.128.13-1" authors = ["Mozilla"] links = "mozjs" license.workspace = true @@ -24,6 +24,7 @@ doctest = false [features] debugmozjs = [] profilemozjs = [] +jit = [] jitspew = [] crown = [] oom_with_hook = [] diff --git a/mozjs-sys/build.rs b/mozjs-sys/build.rs index 44d48be627..4496465c4c 100644 --- a/mozjs-sys/build.rs +++ b/mozjs-sys/build.rs @@ -405,6 +405,9 @@ fn should_build_from_source() -> bool { } else if env::var_os("CARGO_FEATURE_DEBUGMOZJS").is_some() { println!("debug-mozjs feature is enabled. Building from source directly."); true + } else if !env::var_os("CARGO_FEATURE_JIT").is_some() { + println!("jit feature is NOT enabled. Building from source directly."); + true } else { false } diff --git a/mozjs-sys/makefile.cargo b/mozjs-sys/makefile.cargo index f96ff430f7..44d8de2af8 100644 --- a/mozjs-sys/makefile.cargo +++ b/mozjs-sys/makefile.cargo @@ -11,6 +11,10 @@ CONFIGURE_FLAGS := \ --disable-shared-js \ --build-backends=RecursiveMake +ifeq (,$(CARGO_FEATURE_JIT)) + CONFIGURE_FLAGS += --disable-jit +endif + ifneq (,$(CARGO_FEATURE_JITSPEW)) CONFIGURE_FLAGS += --enable-jitspew endif @@ -63,7 +67,7 @@ ifneq ($(HOST),$(TARGET)) endif ifeq (aarch64-unknown-linux-gnu,$(TARGET)) - # Reset TARGET variable because aarch64 target name used by Rust is not + # Reset TARGET variable because aarch64 target name used by Rust is not # the same as the target name needed for the CXX toolchain. TARGET = aarch64-linux-gnu endif diff --git a/mozjs/Cargo.toml b/mozjs/Cargo.toml index 51b0667b47..df0f67f4ff 100644 --- a/mozjs/Cargo.toml +++ b/mozjs/Cargo.toml @@ -2,7 +2,7 @@ name = "mozjs" description = "Rust bindings to the Mozilla SpiderMonkey JavaScript engine." repository.workspace = true -version = "0.14.1" +version = "0.14.2" authors = ["The Servo Project Developers"] license.workspace = true edition.workspace = true @@ -12,6 +12,8 @@ doctest = false [features] debugmozjs = ['mozjs_sys/debugmozjs'] +default = ["jit"] +jit = ['mozjs_sys/jit'] jitspew = ['mozjs_sys/jitspew'] profilemozjs = ['mozjs_sys/profilemozjs'] crown = ['mozjs_sys/crown']