Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build,win: re-enable ninja & multiple build optimizations #22698

Merged
merged 3 commits into from
Sep 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently publish the pdb, e.g. https://nodejs.org/dist/v10.9.0/win-x64/node_pdb.zip so this is semver-major?

cc @nodejs/platform-windows @nodejs/diagnostics

Copy link
Member

@richardlau richardlau Sep 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also

node/vcbuild.bat

Lines 372 to 378 in 4cea01a

echo Creating node_pdb.7z
del node_pdb.7z > nul 2> nul
7z a -mx9 -t7z node_pdb.7z node.pdb > nul
echo Creating node_pdb.zip
del node_pdb.zip > nul 2> nul
7z a -mx9 -tzip node_pdb.zip node.pdb > nul

which is only run on the CI for releases (not for regular PR's).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh. This generates a .pdb file but only a single one during linking.

'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': {
Expand Down Expand Up @@ -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+': [
Expand Down
13 changes: 11 additions & 2 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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"', {
Expand All @@ -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)',
],
},
},
Expand Down Expand Up @@ -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)' ]
Expand Down
6 changes: 3 additions & 3 deletions node.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
'msvs_settings': {
'VCLinkerTool': {
'AdditionalOptions': [
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\zlib<(STATIC_LIB_SUFFIX)',
'/WHOLEARCHIVE:zlib<(STATIC_LIB_SUFFIX)',
],
},
},
Expand Down Expand Up @@ -179,7 +179,7 @@
'msvs_settings': {
'VCLinkerTool': {
'AdditionalOptions': [
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\libuv<(STATIC_LIB_SUFFIX)',
'/WHOLEARCHIVE:libuv<(STATIC_LIB_SUFFIX)',
],
},
},
Expand Down Expand Up @@ -316,7 +316,7 @@
'msvs_settings': {
'VCLinkerTool': {
'AdditionalOptions': [
'/WHOLEARCHIVE:<(PRODUCT_DIR)\\lib\\<(openssl_product)',
'/WHOLEARCHIVE:<(openssl_product)',
],
},
},
Expand Down