Commit b411a664 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[build] Assert that webassembly is disabled on lite mode

This avoids having to check both flags in two places, and prevents
people from trying to enable WebAssembly in lite mode (which would
currently build, but you still would not get Wasm support).

The downside is that the default value shown by `gn args --list` now
sais `""` instead of `true`.

R=machenbach@chromium.org, rmcilroy@chromium.org
CC=ecmziegler@chromium.org

Bug: v8:11238
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Change-Id: Ib2fe6c32cbdeb89895265bb898abf7284c560cc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712783
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72957}
parent 9c6d177a
......@@ -40,11 +40,6 @@ declare_args() {
# Sets -DV8_ENABLE_FUTURE.
v8_enable_future = false
# Lite mode disables a number of performance optimizations to reduce memory
# at the cost of performance.
# Sets --DV8_LITE_MODE.
v8_enable_lite_mode = false
# Sets -DSYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing
v8_enable_system_instrumentation = false
......@@ -771,7 +766,7 @@ config("features") {
if (v8_etw_guid != "") {
defines += [ "V8_ETW_GUID=\"$v8_etw_guid\"" ]
}
if (v8_enable_webassembly && !v8_enable_lite_mode) {
if (v8_enable_webassembly) {
defines += [ "V8_ENABLE_WEBASSEMBLY" ]
}
if (v8_dict_property_const_tracking) {
......
......@@ -64,11 +64,16 @@ declare_args() {
# Enable WebAssembly debugging via GDB-remote protocol.
v8_enable_wasm_gdb_remote_debugging = false
# Lite mode disables a number of performance optimizations to reduce memory
# at the cost of performance.
# Sets -DV8_LITE_MODE.
v8_enable_lite_mode = false
# Include support for WebAssembly. If disabled, the 'WebAssembly' global
# will not be available, and embedder APIs to generate WebAssembly modules
# will fail. Also, asm.js will not be translated to WebAssembly and will be
# executed as standard JavaScript instead.
v8_enable_webassembly = true
v8_enable_webassembly = ""
# Add fuzzilli fuzzer support.
v8_fuzzilli = false
......@@ -104,6 +109,13 @@ if (build_with_chromium && use_perfetto_client_library) {
v8_use_perfetto = true
}
# WebAssembly is enabled by default, except in lite mode.
if (v8_enable_webassembly == "") {
v8_enable_webassembly = !v8_enable_lite_mode
}
assert(!(v8_enable_webassembly && v8_enable_lite_mode),
"Webassembly is not available in lite mode.")
# Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute
# paths for all configs in templates as they are shared in different
# subdirectories.
......
......@@ -646,9 +646,6 @@ class BaseTestRunner(object):
'--noenable-sse4-1',
'--no-enable-sse4_1'])
has_webassembly = self.build_config.webassembly and \
not self.build_config.lite_mode
# Set no_simd_sse on architectures without Simd enabled.
if self.build_config.arch == 'ppc64':
no_simd_sse = True
......@@ -666,7 +663,7 @@ class BaseTestRunner(object):
"gc_fuzzer": False,
"gc_stress": False,
"gcov_coverage": self.build_config.gcov_coverage,
"has_webassembly": has_webassembly,
"has_webassembly": self.build_config.webassembly,
"isolates": options.isolates,
"is_clang": self.build_config.is_clang,
"is_full_debug": self.build_config.is_full_debug,
......
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