Skip to content

Commit 61f735e

Browse files
committed
build,win: disable DLL-interface warnings
Compiling node with vcbuild generates 10,000s of these warnings, originating from v8.h. This makes it impossible to read any other diagnostic messages. Refs: #15570 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> PR-URL: #20958
1 parent 8fac1d9 commit 61f735e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

common.gypi

+12-4
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,18 @@
236236
'BufferSecurityCheck': 'true',
237237
'ExceptionHandling': 0, # /EHsc
238238
'SuppressStartupBanner': 'true',
239-
# Disable "warning C4267: conversion from 'size_t' to 'int',
240-
# possible loss of data". Many originate from our dependencies
241-
# and their sheer number drowns out other, more legitimate warnings.
242-
'DisableSpecificWarnings': ['4267'],
239+
# Disable warnings:
240+
# - "C4251: class needs to have dll-interface"
241+
# - "C4275: non-DLL-interface used as base for DLL-interface"
242+
# Over 10k of these warnings are generated when compiling node,
243+
# originating from v8.h. Most of them are false positives.
244+
# See also: https://github.com/nodejs/node/pull/15570
245+
# TODO: re-enable when Visual Studio fixes these upstream.
246+
#
247+
# - "C4267: conversion from 'size_t' to 'int'"
248+
# Many any originate from our dependencies, and their sheer number
249+
# drowns out other, more legitimate warnings.
250+
'DisableSpecificWarnings': ['4251', '4275', '4267'],
243251
'WarnAsError': 'false',
244252
},
245253
'VCLinkerTool': {

0 commit comments

Comments
 (0)