diff --git a/common.gypi b/common.gypi index 9864e8374e74da..cba83cc8cf79ac 100644 --- a/common.gypi +++ b/common.gypi @@ -269,23 +269,11 @@ 'msvs_settings': { 'VCCLCompilerTool': { 'StringPooling': 'true', # pool string literals - 'DebugInformationFormat': 3, # Generate a PDB + 'DebugInformationFormat': 1, # /Z7 embed info in .obj files 'WarningLevel': 3, 'BufferSecurityCheck': 'true', 'ExceptionHandling': 0, # /EHsc 'SuppressStartupBanner': 'true', - # Disable warnings: - # - "C4251: class needs to have dll-interface" - # - "C4275: non-DLL-interface used as base for DLL-interface" - # Over 10k of these warnings are generated when compiling node, - # originating from v8.h. Most of them are false positives. - # See also: https://github.com/nodejs/node/pull/15570 - # TODO: re-enable when Visual Studio fixes these upstream. - # - # - "C4267: conversion from 'size_t' to 'int'" - # Many any originate from our dependencies, and their sheer number - # drowns out other, more legitimate warnings. - 'DisableSpecificWarnings': ['4251', '4275', '4267'], 'WarnAsError': 'false', }, 'VCLinkerTool': { @@ -316,7 +304,20 @@ 'SuppressStartupBanner': 'true', }, }, - 'msvs_disabled_warnings': [4351, 4355, 4800], + # Disable warnings: + # - "C4251: class needs to have dll-interface" + # - "C4275: non-DLL-interface used as base for DLL-interface" + # Over 10k of these warnings are generated when compiling node, + # originating from v8.h. Most of them are false positives. + # See also: https://github.com/nodejs/node/pull/15570 + # TODO: re-enable when Visual Studio fixes these upstream. + # + # - "C4267: conversion from 'size_t' to 'int'" + # Many any originate from our dependencies, and their sheer number + # drowns out other, more legitimate warnings. + # - "C4244: conversion from 'type1' to 'type2', possible loss of data" + # Ususaly safe. Disable for `dep`, enable for `src` + 'msvs_disabled_warnings': [4351, 4355, 4800, 4251, 4275, 4244, 4267], 'conditions': [ ['asan == 1 and OS != "mac"', { 'cflags+': [ diff --git a/node.gyp b/node.gyp index 64ed3df538f74f..3f71e154b98958 100644 --- a/node.gyp +++ b/node.gyp @@ -239,6 +239,11 @@ 'src', 'deps/v8/include', ], + + # - "C4244: conversion from 'type1' to 'type2', possible loss of data" + # Ususaly safe. Disable for `dep`, enable for `src` + 'msvs_disabled_warnings!': [4244], + 'conditions': [ [ 'node_intermediate_lib_type=="static_library" and ' 'node_shared=="true" and OS=="aix"', { @@ -261,8 +266,7 @@ 'msvs_settings': { 'VCLinkerTool': { 'AdditionalOptions': [ - '/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\' - '<(node_core_target_name)<(STATIC_LIB_SUFFIX)', + '/WHOLEARCHIVE:<(node_core_target_name)<(STATIC_LIB_SUFFIX)', ], }, }, @@ -473,6 +477,11 @@ 'V8_DEPRECATION_WARNINGS=1', 'NODE_OPENSSL_SYSTEM_CERT_PATH="<(openssl_system_ca_path)"', ], + + # - "C4244: conversion from 'type1' to 'type2', possible loss of data" + # Ususaly safe. Disable for `dep`, enable for `src` + 'msvs_disabled_warnings!': [4244], + 'conditions': [ [ 'node_code_cache_path!=""', { 'sources': [ '<(node_code_cache_path)' ] diff --git a/node.gypi b/node.gypi index acd9f83213021d..db29084335be50 100644 --- a/node.gypi +++ b/node.gypi @@ -141,7 +141,7 @@ 'msvs_settings': { 'VCLinkerTool': { 'AdditionalOptions': [ - '/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\zlib<(STATIC_LIB_SUFFIX)', + '/WHOLEARCHIVE:zlib<(STATIC_LIB_SUFFIX)', ], }, }, @@ -179,7 +179,7 @@ 'msvs_settings': { 'VCLinkerTool': { 'AdditionalOptions': [ - '/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\libuv<(STATIC_LIB_SUFFIX)', + '/WHOLEARCHIVE:libuv<(STATIC_LIB_SUFFIX)', ], }, }, @@ -316,7 +316,7 @@ 'msvs_settings': { 'VCLinkerTool': { 'AdditionalOptions': [ - '/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\<(openssl_product)', + '/WHOLEARCHIVE:<(openssl_product)', ], }, },