From 920f623438bc5ff931608268465cd3ec58ff3115 Mon Sep 17 00:00:00 2001 From: Tom S <123829855+Tom4ikss@users.noreply.github.com> Date: Fri, 6 Nov 2026 05:57:22 +0300 Subject: [PATCH] build: generate builtins-effects.cc in DCHECK builds V8 checks the can_allocate effect of builtin calls whenever DEBUG is defined, and links the BuiltinCanAllocate() that mksnapshot generates into builtins-effects.cc. V8's GN build generates that file when is_DEBUG_defined, which includes v8_dcheck_always_on. The gyp build only did it for build_type=="Debug", so a release build configured with --v8-with-dchecks, which defines DEBUG for V8, failed to link with an undefined symbol BuiltinCanAllocate(). Signed-off-by: Tom S <123829855+Tom4ikss@users.noreply.github.com> --- tools/v8_gypfiles/v8.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index e1f8432c6876..b38d52a8d17a 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -473,7 +473,7 @@ 'mksnapshot_flags': ['--no-native-code-counters'], }, }], - ['build_type=="Debug"', { + ['build_type=="Debug" or dcheck_always_on==1', { 'outputs': [ '<(INTERMEDIATE_DIR)/src/builtins/builtins-effects.cc', ],