summaryrefslogtreecommitdiffstats
path: root/js/moz.configure
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/moz.configure25
1 files changed, 10 insertions, 15 deletions
diff --git a/js/moz.configure b/js/moz.configure
index cbcaf38f01..675736a797 100644
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -173,18 +173,12 @@ def enable_decorators(value):
set_config("ENABLE_DECORATORS", enable_decorators)
set_define("ENABLE_DECORATORS", enable_decorators)
+
# Enable JSON.parse with source
# ===================================================
-option(
- "--enable-json-parse-with-source",
- default=False,
- help="Enable experimental JS JSON.parse with source support",
-)
-
-
-@depends("--enable-json-parse-with-source")
-def enable_json_parse_with_source(value):
- if value:
+@depends(milestone.is_nightly)
+def enable_json_parse_with_source(is_nightly):
+ if is_nightly:
return True
@@ -597,13 +591,14 @@ set_define("MOZ_AARCH64_JSCVT", aarch64_jscvt)
@depends(target)
-def has_pthread_jit_write_protect_np(target):
- return target.os == "OSX" and target.cpu == "aarch64"
+def has_apple_fast_wx(target):
+ return target.kernel == "Darwin" and target.cpu == "aarch64"
-# On Apple Silicon we use MAP_JIT with pthread_jit_write_protect_np to implement
-# JIT code write protection.
-set_define("JS_USE_APPLE_FAST_WX", True, when=has_pthread_jit_write_protect_np)
+# On Apple Silicon macOS we use MAP_JIT with pthread_jit_write_protect_np to
+# implement JIT code write protection, while on iOS we use MAP_JIT with
+# be_memory_inline_jit_restrict_*.
+set_define("JS_USE_APPLE_FAST_WX", True, when=has_apple_fast_wx)
# CTypes