From 20a917c571a410c3e5abed67dc55ec495cd221cd Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 3 Feb 2019 15:51:20 -0500 Subject: [PATCH 1/7] build: move optimizing link directives to node.exe target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ASCIIbetize directives * Merge duplicate directives from 'conditions' PR-URL: https://github.com/nodejs/node/pull/25931 Reviewed-By: João Reis --- common.gypi | 124 ++++++++++++++-------------------------------------- node.gyp | 42 +++++++++++++++++- 2 files changed, 74 insertions(+), 92 deletions(-) diff --git a/common.gypi b/common.gypi index da68130484dcf3..3736ec5af135fa 100644 --- a/common.gypi +++ b/common.gypi @@ -137,13 +137,17 @@ 'Debug': { 'variables': { 'v8_enable_handle_zapping': 1, + 'conditions': [ + ['node_shared != "true"', { + 'MSVC_runtimeType': 1, # MultiThreadedDebug (/MTd) + }, { + 'MSVC_runtimeType': 3, # MultiThreadedDebugDLL (/MDd) + }], + ], }, 'defines': [ 'DEBUG', '_DEBUG', 'V8_ENABLE_CHECKS' ], 'cflags': [ '-g', '-O0' ], 'conditions': [ - ['target_arch=="x64"', { - 'msvs_configuration_platform': 'x64', - }], ['OS=="aix"', { 'cflags': [ '-gxcoff' ], 'ldflags': [ '-Wl,-bbigtoc' ], @@ -152,31 +156,14 @@ 'cflags': [ '-fPIE' ], 'ldflags': [ '-fPIE', '-pie' ] }], - ['node_shared=="true"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': 3, # MultiThreadedDebugDLL (/MDd) - } - } - }], - ['node_shared=="false"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': 1 # MultiThreadedDebug (/MTd) - } - } - }] ], 'msvs_settings': { 'VCCLCompilerTool': { - 'Optimization': 0, # /Od, no optimization + 'BasicRuntimeChecks': 3, # /RTC1 'MinimalRebuild': 'false', 'OmitFramePointers': 'false', - 'BasicRuntimeChecks': 3, # /RTC1 - 'MultiProcessorCompilation': 'true', - 'AdditionalOptions': [ - '/bigobj', # prevent error C1128 in VS2015 - ], + 'Optimization': 0, # /Od, no optimization + 'RuntimeLibrary': '<(MSVC_runtimeType)', }, 'VCLinkerTool': { 'LinkIncremental': 2, # enable incremental linking @@ -189,12 +176,19 @@ 'Release': { 'variables': { 'v8_enable_handle_zapping': 0, + 'pgo_generate': ' -fprofile-generate ', + 'pgo_use': ' -fprofile-use -fprofile-correction ', + 'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ', + 'conditions': [ + ['node_shared != "true"', { + 'MSVC_runtimeType': 0 # MultiThreaded (/MT) + }, { + 'MSVC_runtimeType': 2 # MultiThreadedDLL (/MD) + }], + ], }, 'cflags': [ '-O3' ], 'conditions': [ - ['target_arch=="x64"', { - 'msvs_configuration_platform': 'x64', - }], ['OS=="solaris"', { # pull in V8's postmortem metadata 'ldflags': [ '-Wl,-z,allextract' ] @@ -203,11 +197,6 @@ 'cflags': [ '-fno-omit-frame-pointer' ], }], ['OS=="linux"', { - 'variables': { - 'pgo_generate': ' -fprofile-generate ', - 'pgo_use': ' -fprofile-use -fprofile-correction ', - 'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ', - }, 'conditions': [ ['enable_pgo_generate=="true"', { 'cflags': ['<(pgo_generate)'], @@ -227,62 +216,17 @@ 'cflags': [ '-fPIE' ], 'ldflags': [ '-fPIE', '-pie' ] }], - ['node_shared=="true"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': 2 # MultiThreadedDLL (/MD) - } - } - }], - ['node_shared=="false"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': 0 # MultiThreaded (/MT) - } - } - }], - ['node_with_ltcg=="true"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'WholeProgramOptimization': 'true' # /GL, whole program optimization, needed for LTCG - }, - 'VCLibrarianTool': { - 'AdditionalOptions': [ - '/LTCG:INCREMENTAL', # link time code generation - ] - }, - 'VCLinkerTool': { - 'OptimizeReferences': 2, # /OPT:REF - 'EnableCOMDATFolding': 2, # /OPT:ICF - 'LinkIncremental': 1, # disable incremental linking - 'AdditionalOptions': [ - '/LTCG:INCREMENTAL', # incremental link-time code generation - ] - } - } - }, { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'WholeProgramOptimization': 'false' - }, - 'VCLinkerTool': { - 'LinkIncremental': 2 # enable incremental linking - } - } - }] ], 'msvs_settings': { 'VCCLCompilerTool': { - 'Optimization': 3, # /Ox, full optimization - 'FavorSizeOrSpeed': 1, # /Ot, favor speed over size - 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible - 'OmitFramePointers': 'true', 'EnableFunctionLevelLinking': 'true', 'EnableIntrinsicFunctions': 'true', + 'FavorSizeOrSpeed': 1, # /Ot, favor speed over size + 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible + 'OmitFramePointers': 'true', + 'Optimization': 3, # /Ox, full optimization + 'RuntimeLibrary': '<(MSVC_runtimeType)', 'RuntimeTypeInfo': 'false', - 'MultiProcessorCompilation': 'true', - 'AdditionalOptions': [ - ], } } } @@ -301,13 +245,14 @@ 'cflags!': ['-Werror'], 'msvs_settings': { 'VCCLCompilerTool': { - 'StringPooling': 'true', # pool string literals - 'DebugInformationFormat': 1, # /Z7 embed info in .obj files - 'WarningLevel': 3, 'BufferSecurityCheck': 'true', + 'DebugInformationFormat': 1, # /Z7 embed info in .obj files 'ExceptionHandling': 0, # /EHsc + 'MultiProcessorCompilation': 'true', + 'StringPooling': 'true', # pool string literals 'SuppressStartupBanner': 'true', 'WarnAsError': 'false', + 'WarningLevel': 3, # /W3 }, 'VCLinkerTool': { 'conditions': [ @@ -329,11 +274,6 @@ }], ], 'GenerateDebugInformation': 'true', - 'GenerateMapFile': 'true', # /MAP - 'MapExports': 'true', # /MAPINFO:EXPORTS - 'RandomizedBaseAddress': 2, # enable ASLR - 'DataExecutionPrevention': 2, # enable DEP - 'AllowIsolation': 'true', 'SuppressStartupBanner': 'true', }, }, @@ -351,7 +291,12 @@ # - "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], + 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin + 'conditions': [ + [ 'target_arch=="x64"', { + 'msvs_configuration_platform': 'x64', + }], ['asan == 1 and OS != "mac"', { 'cflags+': [ '-fno-omit-frame-pointer', @@ -380,7 +325,6 @@ ], }], ['OS == "win"', { - 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin 'defines': [ 'WIN32', # we don't really want VC++ warning us about diff --git a/node.gyp b/node.gyp index da3e5ee8454db1..d0a715b91e1dbe 100644 --- a/node.gyp +++ b/node.gyp @@ -266,6 +266,16 @@ ], 'dependencies': [ 'deps/histogram/histogram.gyp:histogram' ], + 'msvs_settings': { + 'VCLinkerTool': { + 'GenerateMapFile': 'true', # /MAP + 'MapExports': 'true', # /MAPINFO:EXPORTS + 'RandomizedBaseAddress': 2, # enable ASLR + 'DataExecutionPrevention': 2, # enable DEP + 'AllowIsolation': 'true', + }, + }, + # - "C4244: conversion from 'type1' to 'type2', possible loss of data" # Ususaly safe. Disable for `dep`, enable for `src` 'msvs_disabled_warnings!': [4244], @@ -281,8 +291,7 @@ }, { 'dependencies': [ '<(node_lib_target_name)' ], }], - [ 'node_intermediate_lib_type=="static_library" and ' - 'node_shared=="false"', { + [ 'node_intermediate_lib_type=="static_library" and node_shared=="false"', { 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)' @@ -348,6 +357,35 @@ }], ], }], + ['node_with_ltcg=="true"', { + 'msvs_settings': { + 'VCCLCompilerTool': { + 'WholeProgramOptimization': 'true' # /GL, whole program optimization, needed for LTCG + }, + 'VCLibrarianTool': { + 'AdditionalOptions': [ + '/LTCG:INCREMENTAL', # link time code generation + ], + }, + 'VCLinkerTool': { + 'OptimizeReferences': 2, # /OPT:REF + 'EnableCOMDATFolding': 2, # /OPT:ICF + 'LinkIncremental': 1, # disable incremental linking + 'AdditionalOptions': [ + '/LTCG:INCREMENTAL', # incremental link-time code generation + ], + } + } + }, { + 'msvs_settings': { + 'VCCLCompilerTool': { + 'WholeProgramOptimization': 'false' + }, + 'VCLinkerTool': { + 'LinkIncremental': 2 # enable incremental linking + }, + }, + }] ], }, # node_core_target_name { From 82b798907d201bfb88bfadee24cf31d87d1bc70c Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 3 Feb 2019 15:52:18 -0500 Subject: [PATCH 2/7] build,tools: add more headers to V8 PCH file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use relative path for easy reuse in other projects PR-URL: https://github.com/nodejs/node/pull/25931 Reviewed-By: João Reis --- tools/msvs/pch/pch_v8_base.cc | 2 +- tools/msvs/pch/pch_v8_base.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/msvs/pch/pch_v8_base.cc b/tools/msvs/pch/pch_v8_base.cc index 828977c03692d6..d0666ed3d4f7d0 100644 --- a/tools/msvs/pch/pch_v8_base.cc +++ b/tools/msvs/pch/pch_v8_base.cc @@ -1 +1 @@ -#include "tools/msvs/pch/pch_v8_base.h" +#include "pch_v8_base.h" diff --git a/tools/msvs/pch/pch_v8_base.h b/tools/msvs/pch/pch_v8_base.h index ebac7914823ac5..2c543beac2111b 100644 --- a/tools/msvs/pch/pch_v8_base.h +++ b/tools/msvs/pch/pch_v8_base.h @@ -1 +1,3 @@ +#include "src/api-inl.h" #include "src/objects-inl.h" +#include "src/utils.h" From cd5c7bf240f92d2a5007f1e0de1dfc76d54222fd Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 3 Feb 2019 16:03:14 -0500 Subject: [PATCH 3/7] build,deps: use PCH also for v8_initializers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * rename files to represent reuse PR-URL: https://github.com/nodejs/node/pull/25931 Reviewed-By: João Reis --- common.gypi | 2 +- deps/v8/gypfiles/v8.gyp | 23 +++++++++++++--------- tools/msvs/pch/pch_v8_base.cc | 1 - tools/msvs/pch/v8_pch.cc | 1 + tools/msvs/pch/{pch_v8_base.h => v8_pch.h} | 0 5 files changed, 16 insertions(+), 11 deletions(-) delete mode 100644 tools/msvs/pch/pch_v8_base.cc create mode 100644 tools/msvs/pch/v8_pch.cc rename tools/msvs/pch/{pch_v8_base.h => v8_pch.h} (100%) diff --git a/common.gypi b/common.gypi index 3736ec5af135fa..1e399772811019 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.11', + 'v8_embedder_string': '-node.12', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/gypfiles/v8.gyp b/deps/v8/gypfiles/v8.gyp index dd0f6799d5ae90..1c219fad50fef7 100644 --- a/deps/v8/gypfiles/v8.gyp +++ b/deps/v8/gypfiles/v8.gyp @@ -222,7 +222,7 @@ 'dependencies': [ 'v8_base', ], - 'variables': { + 'variables': { 'optimize': 'max', }, 'include_dirs': [ @@ -359,16 +359,20 @@ }], # Platforms that don't have Compare-And-Swap support need to link atomic # library to implement atomic memory access - [ 'v8_current_cpu == "mips" or v8_current_cpu == "mipsel" or ' - 'v8_current_cpu == "mips64" or v8_current_cpu == "mips64el" or ' - 'v8_current_cpu == "ppc" or v8_current_cpu == "ppc64" or ' - 'v8_current_cpu == "s390" or v8_current_cpu == "s390x"', - { + [ 'v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "ppc64", "s390", "s390x"]', { 'link_settings': { 'libraries': [ '-latomic', ], }, }, ], + ['OS=="win" and node_use_pch == "true"', { + 'msvs_precompiled_header': '../../../tools/msvs/pch/v8_pch.h', + 'msvs_precompiled_source': '../../../tools/msvs/pch/v8_pch.cc', + 'sources': [ + '<(_msvs_precompiled_header)', + '<(_msvs_precompiled_source)', + ], + }], ], }, # v8_initializers { @@ -1942,10 +1946,11 @@ # See http://crbug.com/485155. 'msvs_shard': 4, }, { - 'msvs_precompiled_header': 'tools/msvs/pch/pch_v8_base.h', - 'msvs_precompiled_source': '../../../tools/msvs/pch/pch_v8_base.cc', + 'msvs_precompiled_header': '../../../tools/msvs/pch/v8_pch.h', + 'msvs_precompiled_source': '../../../tools/msvs/pch/v8_pch.cc', 'sources': [ - '../../../tools/msvs/pch/pch_v8_base.cc', + '<(_msvs_precompiled_header)', + '<(_msvs_precompiled_source)', ], }], ], diff --git a/tools/msvs/pch/pch_v8_base.cc b/tools/msvs/pch/pch_v8_base.cc deleted file mode 100644 index d0666ed3d4f7d0..00000000000000 --- a/tools/msvs/pch/pch_v8_base.cc +++ /dev/null @@ -1 +0,0 @@ -#include "pch_v8_base.h" diff --git a/tools/msvs/pch/v8_pch.cc b/tools/msvs/pch/v8_pch.cc new file mode 100644 index 00000000000000..03a5d999d36d9d --- /dev/null +++ b/tools/msvs/pch/v8_pch.cc @@ -0,0 +1 @@ +#include "v8_pch.h" diff --git a/tools/msvs/pch/pch_v8_base.h b/tools/msvs/pch/v8_pch.h similarity index 100% rename from tools/msvs/pch/pch_v8_base.h rename to tools/msvs/pch/v8_pch.h From 469875761070bc64d405792e312f6f2f7ee1ed88 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 3 Feb 2019 16:09:36 -0500 Subject: [PATCH 4/7] build,deps: remove cygwin configuration which is not supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/25931 Reviewed-By: João Reis --- deps/v8/gypfiles/v8.gyp | 61 ++++++++++------------------------------- 1 file changed, 14 insertions(+), 47 deletions(-) diff --git a/deps/v8/gypfiles/v8.gyp b/deps/v8/gypfiles/v8.gyp index 1c219fad50fef7..de8fd92f7d58ff 100644 --- a/deps/v8/gypfiles/v8.gyp +++ b/deps/v8/gypfiles/v8.gyp @@ -1935,12 +1935,9 @@ ], }], ['OS=="win"', { - 'variables': { - 'gyp_generators': ' Date: Sat, 13 Oct 2018 15:13:43 -0400 Subject: [PATCH 5/7] build,src: add PCH to node.gypi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/25931 Reviewed-By: João Reis --- node.gypi | 11 +++++++++-- tools/msvs/pch/node_pch.cc | 1 + tools/msvs/pch/node_pch.h | 13 +++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 tools/msvs/pch/node_pch.cc create mode 100644 tools/msvs/pch/node_pch.h diff --git a/node.gypi b/node.gypi index 7d6ff06128ac63..cbedd8028a5425 100644 --- a/node.gypi +++ b/node.gypi @@ -36,7 +36,7 @@ ], }, 'conditions': [ - ['clang==1', { + [ 'clang==1', { 'cflags': [ '-Werror=undefined-inline', ] }], [ 'node_shared=="false"', { @@ -68,7 +68,14 @@ }, { # POSIX 'defines': [ '__POSIX__' ], }], - + [ 'node_use_pch=="true"', { + 'msvs_precompiled_header': 'tools/msvs/pch/node_pch.h', + 'msvs_precompiled_source': 'tools/msvs/pch/node_pch.cc', + 'sources': [ + '<(_msvs_precompiled_header)', + '<(_msvs_precompiled_source)', + ], + }], [ 'node_enable_d8=="true"', { 'dependencies': [ 'deps/v8/gypfiles/d8.gyp:d8' ], }], diff --git a/tools/msvs/pch/node_pch.cc b/tools/msvs/pch/node_pch.cc new file mode 100644 index 00000000000000..2b49436d626c43 --- /dev/null +++ b/tools/msvs/pch/node_pch.cc @@ -0,0 +1 @@ +#include "node_pch.h" diff --git a/tools/msvs/pch/node_pch.h b/tools/msvs/pch/node_pch.h new file mode 100644 index 00000000000000..5164f2f7fc946c --- /dev/null +++ b/tools/msvs/pch/node_pch.h @@ -0,0 +1,13 @@ +#pragma once +#include "aliased_buffer.h" +#include "base_object-inl.h" +#include "env-inl.h" +#include "node_internals.h" +#include "util-inl.h" +#include "uv.h" +#include "v8.h" + +#include +#include +#include +#include From ff4adab78c5237a89cb207d9be7e5e81398fe640 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Mon, 4 Feb 2019 15:49:47 -0500 Subject: [PATCH 6/7] build,win: always build with PCH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/25931 Reviewed-By: João Reis --- common.gypi | 3 +-- configure.py | 10 ---------- deps/v8/gypfiles/v8.gyp | 17 ++++------------- node.gypi | 6 ++---- vcbuild.bat | 8 ++------ 5 files changed, 9 insertions(+), 35 deletions(-) diff --git a/common.gypi b/common.gypi index 1e399772811019..079ebb1f0a91b9 100644 --- a/common.gypi +++ b/common.gypi @@ -19,7 +19,6 @@ 'node_use_bundled_v8%': 'true', 'node_module_version%': '', 'node_with_ltcg%': '', - 'node_use_pch%': 'false', 'node_shared_openssl%': 'false', 'node_tag%': '', @@ -38,7 +37,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.12', + 'v8_embedder_string': '-node.13', ##### V8 defaults for Node.js ##### diff --git a/configure.py b/configure.py index 5a7cade60cb657..74fffa9b2e9918 100755 --- a/configure.py +++ b/configure.py @@ -448,11 +448,6 @@ dest='with_ltcg', help='Use Link Time Code Generation. This feature is only available on Windows.') -parser.add_option('--with-pch', - action='store_true', - dest='with_pch', - help='Use Precompiled Headers (only available on Windows).') - intl_optgroup.add_option('--download', action='store', dest='download_list', @@ -1070,11 +1065,6 @@ def configure_node(o): if flavor != 'win' and options.with_ltcg: raise Exception('Link Time Code Generation is only supported on Windows.') - if flavor == 'win': - o['variables']['node_use_pch'] = b(options.with_pch) - else: - o['variables']['node_use_pch'] = 'false' - if options.tag: o['variables']['node_tag'] = '-' + options.tag else: diff --git a/deps/v8/gypfiles/v8.gyp b/deps/v8/gypfiles/v8.gyp index de8fd92f7d58ff..857ff0ecece3a8 100644 --- a/deps/v8/gypfiles/v8.gyp +++ b/deps/v8/gypfiles/v8.gyp @@ -365,7 +365,7 @@ }, }, ], - ['OS=="win" and node_use_pch == "true"', { + ['OS=="win"', { 'msvs_precompiled_header': '../../../tools/msvs/pch/v8_pch.h', 'msvs_precompiled_source': '../../../tools/msvs/pch/v8_pch.cc', 'sources': [ @@ -1936,20 +1936,11 @@ }], ['OS=="win"', { 'msvs_disabled_warnings': [4351, 4355, 4800], - 'conditions': [ - ['node_use_pch != "true"', { - # When building Official, the .lib is too large and exceeds the 2G - # limit. This breaks it into multiple pieces to avoid the limit. - # See http://crbug.com/485155. - 'msvs_shard': 4, - }, { 'msvs_precompiled_header': '../../../tools/msvs/pch/v8_pch.h', 'msvs_precompiled_source': '../../../tools/msvs/pch/v8_pch.cc', - 'sources': [ - '<(_msvs_precompiled_header)', - '<(_msvs_precompiled_source)', - ], - }], + 'sources': [ + '<(_msvs_precompiled_header)', + '<(_msvs_precompiled_source)', ], # This will prevent V8's .cc files conflicting with the inspector's # .cpp files in the same shard. diff --git a/node.gypi b/node.gypi index cbedd8028a5425..f528a2082ea48d 100644 --- a/node.gypi +++ b/node.gypi @@ -65,16 +65,14 @@ 'NOMINMAX', '_UNICODE=1', ], - }, { # POSIX - 'defines': [ '__POSIX__' ], - }], - [ 'node_use_pch=="true"', { 'msvs_precompiled_header': 'tools/msvs/pch/node_pch.h', 'msvs_precompiled_source': 'tools/msvs/pch/node_pch.cc', 'sources': [ '<(_msvs_precompiled_header)', '<(_msvs_precompiled_source)', ], + }, { # POSIX + 'defines': [ '__POSIX__' ], }], [ 'node_enable_d8=="true"', { 'dependencies': [ 'deps/v8/gypfiles/d8.gyp:d8' ], diff --git a/vcbuild.bat b/vcbuild.bat index aa96555e88d28a..92e20d0f05b948 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -16,7 +16,6 @@ set config=Release set target=Build set target_arch=x64 set ltcg= -set pch=1 set target_env= set noprojgen= set projgen= @@ -63,7 +62,7 @@ set doc= :next-arg if "%1"=="" goto args-done if /i "%1"=="debug" set config=Debug&goto arg-ok -if /i "%1"=="release" set config=Release&set ltcg=1&set "pch="&set cctest=1&goto arg-ok +if /i "%1"=="release" set config=Release&set ltcg=1&set cctest=1&goto arg-ok if /i "%1"=="clean" set target=Clean&goto arg-ok if /i "%1"=="ia32" set target_arch=x86&goto arg-ok if /i "%1"=="x86" set target_arch=x86&goto arg-ok @@ -77,7 +76,6 @@ if /i "%1"=="sign" set sign=1&goto arg-ok if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok if /i "%1"=="noetw" set noetw=1&goto arg-ok if /i "%1"=="ltcg" set ltcg=1&goto arg-ok -if /i "%1"=="nopch" set "pch="&goto arg-ok if /i "%1"=="licensertf" set licensertf=1&goto arg-ok if /i "%1"=="test" set test_args=%test_args% -J %common_test_suites%&set lint_cpp=1&set lint_js=1&set lint_md=1&goto arg-ok if /i "%1"=="test-ci" set test_args=%test_args% %test_ci_args% -p tap --logfile test.tap %common_test_suites%&set cctest_args=%cctest_args% --gtest_output=tap:cctest.tap&goto arg-ok @@ -158,7 +156,6 @@ if defined build_release ( set projgen=1 set cctest=1 set ltcg=1 - set "pch=" ) if defined msi set stage_package=1 @@ -174,7 +171,6 @@ if "%config%"=="Debug" set configure_flags=%configure_flags% --debug if defined nosnapshot set configure_flags=%configure_flags% --without-snapshot if defined noetw set configure_flags=%configure_flags% --without-etw& set noetw_msi_arg=/p:NoETW=1 if defined ltcg set configure_flags=%configure_flags% --with-ltcg -if defined pch set configure_flags=%configure_flags% --with-pch if defined release_urlbase set configure_flags=%configure_flags% --release-urlbase=%release_urlbase% if defined download_arg set configure_flags=%configure_flags% %download_arg% if defined enable_vtune_arg set configure_flags=%configure_flags% --enable-vtune-profiling @@ -670,7 +666,7 @@ del .used_configure_flags goto exit :help -echo vcbuild.bat [debug/release] [msi] [doc] [test/test-ci/test-all/test-addons/test-js-native-api/test-node-api/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [nopch] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm] +echo vcbuild.bat [debug/release] [msi] [doc] [test/test-ci/test-all/test-addons/test-js-native-api/test-node-api/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [ltcg] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm] echo Examples: echo vcbuild.bat : builds release build echo vcbuild.bat debug : builds debug build From 2ffd20bb917ee8265efc74696479c1e1f85c42f4 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Mon, 4 Feb 2019 15:52:13 -0500 Subject: [PATCH 7/7] build,win: emit MSBuild summary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/25931 Reviewed-By: João Reis --- vcbuild.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcbuild.bat b/vcbuild.bat index 92e20d0f05b948..9877fb110b3195 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -309,7 +309,7 @@ if "%target%"=="Build" ( if defined cctest set target="Build" ) if "%target%"=="rename_node_bin_win" if exist "%config%\cctest.exe" del "%config%\cctest.exe" -msbuild node.sln %msbcpu% /t:%target% /p:Configuration=%config% /p:Platform=%msbplatform% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo +msbuild node.sln %msbcpu% /t:%target% /p:Configuration=%config% /p:Platform=%msbplatform% /clp:NoItemAndPropertyList;Verbosity=minimal /nologo if errorlevel 1 ( if not defined project_generated echo Building Node with reused solution failed. To regenerate project files use "vcbuild projgen" goto exit