Reland "Turn on v8_enable_virtual_memory_cage for Chromium builds"

This is a reland of 4fb3eae7af

crrev.com/c/3202002 fixed the Chromium build issue.

Original change's description:
> Turn on v8_enable_virtual_memory_cage for Chromium builds
>
> This CL enables the virtual memory cage at compile time by default for
> Chromium builds on x64 and arm64. However, the cage will only be used at
> runtime if the correpsonding Chromium feature is enabled as well.
>
> Bug: chromium:1218005
> Change-Id: I5a452d299ac950f8ec0f741f6b9a153e57b2a666
> Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3200081
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Commit-Queue: Samuel Groß <saelo@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#77212}

Bug: chromium:1218005
Change-Id: I32b1a4088ca44827ca4f76b5d19b8138875bfc97
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3204950
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77229}
This commit is contained in:
Samuel Groß 2021-10-04 10:45:13 +02:00 committed by V8 LUCI CQ
parent 43dbf6003c
commit 75dd3600b4

View File

@ -472,6 +472,13 @@ if (build_with_chromium && v8_current_cpu == "arm64" &&
v8_control_flow_integrity = true
}
# Enable the virtual memory cage on 64-bit Chromium builds.
if (build_with_chromium &&
(v8_current_cpu == "arm64" || v8_current_cpu == "x64")) {
# The cage is incompatible with lsan.
v8_enable_virtual_memory_cage = !is_lsan
}
assert(!v8_disable_write_barriers || v8_enable_single_generation,
"Disabling write barriers works only with single generation")