[ext-code-space] Enable the external code space on Android

The external code space is required for the sandbox, so enable it on
Android to be able to enable the sandbox there as well in the future.

Bug: v8:11880
Change-Id: Ic7ba29c77affc3e0e83c8a93f2f6f53b3c72b8e8
Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3578799
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79924}
This commit is contained in:
Samuel Groß 2022-04-11 17:23:32 +02:00 committed by V8 LUCI CQ
parent d2491aed27
commit 734cf8b9b1

View File

@ -299,7 +299,7 @@ declare_args() {
# Enable the experimental V8 sandbox.
# Sets -DV8_SANDBOX.
v8_enable_sandbox = false
v8_enable_sandbox = ""
# Enable external pointer sandboxing. Requires v8_enable_sandbox.
# Sets -DV8_SANDBOXED_EXTERNAL_POINRTERS.
@ -421,13 +421,10 @@ if (v8_enable_short_builtin_calls == "") {
v8_current_cpu == "x64" || (!is_android && v8_current_cpu == "arm64")
}
if (v8_enable_external_code_space == "") {
# Can't use !is_android here, because Torque toolchain is affected by
# the value of this flag but actually runs on the host side.
v8_enable_external_code_space =
v8_enable_pointer_compression &&
(v8_current_cpu == "x64" ||
(target_os != "android" && target_os != "fuchsia" &&
v8_current_cpu == "arm64"))
(target_os != "fuchsia" && v8_current_cpu == "arm64"))
}
if (v8_enable_maglev == "") {
v8_enable_maglev = v8_current_cpu == "x64" && v8_enable_pointer_compression
@ -493,10 +490,12 @@ if (v8_enable_shared_ro_heap == "") {
v8_enable_pointer_compression_shared_cage
}
# Enable the v8 sandbox on 64-bit Chromium builds.
if (build_with_chromium && v8_enable_pointer_compression_shared_cage &&
v8_enable_external_code_space) {
v8_enable_sandbox = true
if (v8_enable_sandbox == "") {
# TODO(saelo, v8:11880) remove dependency on v8_enable_external_code_space
# once that is enabled everywhere by default.
v8_enable_sandbox =
build_with_chromium && v8_enable_pointer_compression_shared_cage &&
v8_enable_external_code_space
}
# Enable all available sandbox features if sandbox future is enabled.