Commit 850c446a authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[nojit] Add build- and runtime flags

This adds flags for the upcoming JIT-less V8.

Build-time: v8_enable_jitless_mode in gn.args
Runtime: --jitless command-line flag

The build-time flag is expected to be removed as the implementation
matures.

Bug: v8:7777
Change-Id: Ieea404a14c7859a66e18175d1740d73182db9b1b
Reviewed-on: https://chromium-review.googlesource.com/c/1335559
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57533}
parent ee8d9f2e
......@@ -87,6 +87,11 @@ declare_args() {
v8_enable_embedded_builtins =
v8_use_snapshot && !is_aix && (!is_win || is_clang)
# Build-time flag for enabling nojit mode.
# TODO(v8:7777): Remove the build-time flag once the --jitless runtime flag
# does everything we need.
v8_enable_jitless_mode = false
# Enable code-generation-time checking of types in the CodeStubAssembler.
v8_enable_verify_csa = false
......@@ -217,10 +222,13 @@ if (v8_check_microtasks_scopes_consistency == "") {
assert(!v8_enable_embedded_builtins || v8_use_snapshot,
"Embedded builtins only work with snapshots")
assert(
v8_current_cpu != "x86" || !v8_enable_embedded_builtins ||
!v8_untrusted_code_mitigations,
"Embedded builtins on ia32 and untrusted code mitigations are incompatible")
assert(v8_current_cpu != "x86" || !v8_untrusted_code_mitigations,
"Untrusted code mitigations are unsupported on ia32")
assert(!v8_enable_jitless_mode || v8_enable_embedded_builtins,
"JIT-less mode requires embedded builtins")
assert(!v8_enable_jitless_mode || v8_use_snapshot,
"JIT-less mode requires a snapshot build")
v8_random_seed = "314159265"
v8_toolset_for_shell = "host"
......@@ -405,6 +413,9 @@ config("features") {
"V8_EMBEDDED_BYTECODE_HANDLERS",
]
}
if (v8_enable_jitless_mode) {
defines += [ "V8_JITLESS_MODE" ]
}
if (v8_use_multi_snapshots) {
defines += [ "V8_MULTI_SNAPSHOTS" ]
}
......@@ -1172,6 +1183,7 @@ action("v8_dump_build_config") {
"v8_target_cpu=\"$v8_target_cpu\"",
"v8_use_snapshot=$v8_use_snapshot",
"v8_enable_embedded_builtins=$v8_enable_embedded_builtins",
"v8_enable_jitless_mode=$v8_enable_jitless_mode",
"v8_enable_verify_csa=$v8_enable_verify_csa",
"v8_enable_lite_mode=$v8_enable_lite_mode",
]
......
......@@ -1076,6 +1076,14 @@ DEFINE_BOOL(serialization_statistics, false,
DEFINE_UINT(serialization_chunk_size, 4096,
"Custom size for serialization chunks")
// JIT-less V8. Design doc: goo.gl/kRnhVe
#ifdef V8_JITLESS_MODE
DEFINE_BOOL(jitless, false, "Disable runtime allocation of executable memory.")
#else
DEFINE_BOOL_READONLY(jitless, false,
"Disable runtime allocation of executable memory.")
#endif
// Regexp
DEFINE_BOOL(regexp_optimization, true, "generate optimized regexp code")
DEFINE_BOOL(regexp_mode_modifiers, false, "enable inline flags in regexp.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment