From 9d0748c5dfeb0741bb11db50587acc6ee8ddbf92 Mon Sep 17 00:00:00 2001 From: Leszek Swirski Date: Fri, 12 Apr 2024 15:29:09 +0200 Subject: [PATCH] build: disable ICF for mksnapshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5447267 Co-authored-by: Michaƫl Zasso PR-URL: https://github.com/nodejs/node/pull/54077 Reviewed-By: Jiawen Geng Reviewed-By: Richard Lau Reviewed-By: Joyee Cheung Reviewed-By: Marco Ippolito --- node.gyp | 6 ++++++ tools/v8_gypfiles/v8.gyp | 18 ++++++++++++++++++ unofficial.gni | 19 ++++++++++++++++++- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/node.gyp b/node.gyp index 700606e9061..c69670c49b6 100644 --- a/node.gyp +++ b/node.gyp @@ -1405,6 +1405,12 @@ 'tools/snapshot/node_mksnapshot.cc', ], + 'msvs_settings': { + 'VCLinkerTool': { + 'EnableCOMDATFolding': '1', # /OPT:NOICF + }, + }, + 'conditions': [ ['node_write_snapshot_as_array_literals=="true"', { 'defines': [ 'NODE_MKSNAPSHOT_USE_ARRAY_LITERALS=1' ], diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index d65a5c268e5..a1c7e778557 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -1710,6 +1710,24 @@ 'sources': [ '