Commit 1370b29e authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[build] Enable external flag header with defines

Due to some unusual build failures on some trybots,
v8_generate_external_defines_header was reverted to false. This turns it
back on but changes the behaviour so that defines are added to the
command line as well as to the header. Because the generated header
checks that flags that should be unset are actually unset and flags that
should be set are either unset or set to 1, this will cause build
failures on many types of mismatches, although it will not detect where a
flag is not set on the command line when it is set by the header.

If no further failures show up with this, the hybrid part can be removed
and the v8-gn.h header can stand on its own.

Bug: v8:11292, v8:11341
Change-Id: I1deeeebec58f79607e68a28f808649e884810923
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649041
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72327}
parent bce455a3
......@@ -288,7 +288,7 @@ declare_args() {
# If enabled then macro definitions that are used in externally visible
# header files are placed in a separate header file v8-gn.h.
v8_generate_external_defines_header = false
v8_generate_external_defines_header = true
# Include support for WebAssembly. If disabled, the 'WebAssembly' global
# will not be available, and embedder APIs to generate WebAssembly modules
......@@ -569,10 +569,12 @@ disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines
config("v8_header_features") {
visibility = [ ":*" ]
# TODO(v8:11292): Set defines as well as including the header. This is a short
# term change to check that the header doesn't get stale and fail to get
# updated.
defines = enabled_external_v8_defines
if (v8_generate_external_defines_header) {
defines = [ "V8_GN_HEADER" ]
} else {
defines = enabled_external_v8_defines
defines += [ "V8_GN_HEADER" ]
}
}
......@@ -602,10 +604,12 @@ disabled_external_cppgc_defines =
config("cppgc_header_features") {
visibility = [ ":*" ]
# TODO(v8:11292): Set defines as well as including the header. This is a short
# term change to check that the header doesn't get stale and fail to get
# updated.
defines = enabled_external_cppgc_defines
if (v8_generate_external_defines_header) {
defines = [ "V8_GN_HEADER" ]
} else {
defines = enabled_external_cppgc_defines
defines += [ "V8_GN_HEADER" ]
}
}
......
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