From bf2905726eab2409da70af57a6f787823f0a2f06 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 --- 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 484d3ff0329..b97b5fc008a 100644 --- a/node.gyp +++ b/node.gyp @@ -1294,6 +1294,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 1e2b3645132..4e1c2e76855 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -1692,6 +1692,24 @@ 'sources': [ '