diff --git a/BUILD.gn b/BUILD.gn index fec387d31e..05c38bc3ca 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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.