[build] Fix build flag deps with v8_multi_arch_build

v8_multi_arch_build toggles v8_enable_pointer_compression, but some
other flags are set depending on v8_enable_pointer_compression.
Previously the v8_multi_arch_build condition was resetting some of these
in its branch, but we can make this simpler by moving the pointer
compression toggle earlier, immediately after the default pointer
compression setting.

Change-Id: Ie5f4e73f947b693d4ba2abe4e1cf30009a2bbb2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3890918
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83154}
This commit is contained in:
Leszek Swirski 2022-09-13 11:29:35 +02:00 committed by V8 LUCI CQ
parent e1dbe835d7
commit 277d37e0af

View File

@ -418,6 +418,21 @@ if (v8_enable_pointer_compression == "") {
v8_enable_pointer_compression =
v8_current_cpu == "arm64" || v8_current_cpu == "x64"
}
# Toggle pointer compression for correctness fuzzing when building the
# clang_x64_pointer_compression toolchain. We'll correctness-compare the
# default build with the clang_x64_pointer_compression build.
if (v8_multi_arch_build &&
rebase_path(get_label_info(":d8", "root_out_dir"), root_build_dir) ==
"clang_x64_pointer_compression") {
v8_enable_pointer_compression = !v8_enable_pointer_compression
}
# Ensure the sandbox is on/off in the same way as pointer compression for
# correctness fuzzing builds.
if (v8_multi_arch_build) {
v8_enable_sandbox = v8_enable_pointer_compression
}
if (v8_enable_pointer_compression_shared_cage == "") {
v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression
}
@ -481,23 +496,6 @@ assert(!v8_enable_trace_ignition || v8_enable_trace_unoptimized,
assert(!v8_enable_trace_baseline_exec || v8_enable_trace_unoptimized,
"Baseline tracing requires unoptimized tracing to be enabled.")
# Toggle pointer compression for correctness fuzzing when building the
# clang_x64_pointer_compression toolchain. We'll correctness-compare the
# default build with the clang_x64_pointer_compression build.
if (v8_multi_arch_build &&
rebase_path(get_label_info(":d8", "root_out_dir"), root_build_dir) ==
"clang_x64_pointer_compression") {
v8_enable_pointer_compression = !v8_enable_pointer_compression
v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression
v8_enable_external_code_space = v8_enable_pointer_compression
}
# Ensure the sandbox is on/off in the same way as pointer compression for
# correctness fuzzing builds.
if (v8_multi_arch_build) {
v8_enable_sandbox = v8_enable_pointer_compression
}
# Check if it is a Chromium build and activate PAC/BTI if needed.
# TODO(cavalcantii): have a single point of integration with PAC/BTI flags.
if (build_with_chromium && v8_current_cpu == "arm64" &&