mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
build, win: faster Release rebuilds
Sets Link Time Code Generation to INCREMENTAL improving Release rebuilds speed. Adds no-cctest option to vcbuild.bat, which will skip building cctest.exe PR-URL: https://github.com/nodejs/node/pull/17393 Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
1 parent
6c0c60c1f1
commit
8514ea9282
2 files changed
+10
-2
No files matched your search
+3
-1
@@ -186,10 +186,12 @@
|
||||
],
|
||||
},
|
||||
'VCLinkerTool': {
|
||||
'LinkTimeCodeGeneration': 1, # link-time code generation
|
||||
'OptimizeReferences': 2, # /OPT:REF
|
||||
'EnableCOMDATFolding': 2, # /OPT:ICF
|
||||
'LinkIncremental': 1, # disable incremental linking
|
||||
'AdditionalOptions': [
|
||||
'/LTCG:INCREMENTAL', # incremental link-time code generation
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
+7
-1
@@ -51,6 +51,7 @@ set "common_test_suites=%js_test_suites% doctool addons addons-napi&set build_ad
|
||||
set http2_debug=
|
||||
set nghttp2_debug=
|
||||
set link_module=
|
||||
set no_cctest=
|
||||
|
||||
:next-arg
|
||||
if "%1"=="" goto args-done
|
||||
@@ -115,6 +116,7 @@ if /i "%1"=="no-NODE-OPTIONS" set no_NODE_OPTIONS=1&goto arg-ok
|
||||
if /i "%1"=="debug-http2" set debug_http2=1&goto arg-ok
|
||||
if /i "%1"=="debug-nghttp2" set debug_nghttp2=1&goto arg-ok
|
||||
if /i "%1"=="link-module" set "link_module= --link-module=%2%link_module%"&goto arg-ok-2
|
||||
if /i "%1"=="no-cctest" set no_cctest=1&goto arg-ok
|
||||
|
||||
echo Error: invalid command line option `%1`.
|
||||
exit /b 1
|
||||
@@ -275,6 +277,7 @@ set "msbcpu=/m:2"
|
||||
if "%NUMBER_OF_PROCESSORS%"=="1" set "msbcpu=/m:1"
|
||||
set "msbplatform=Win32"
|
||||
if "%target_arch%"=="x64" set "msbplatform=x64"
|
||||
if "%target%"=="Build" if defined no_cctest set target=node
|
||||
msbuild node.sln %msbcpu% /t:%target% /p:Configuration=%config% /p:Platform=%msbplatform% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
|
||||
if errorlevel 1 goto exit
|
||||
if "%target%" == "Clean" goto exit
|
||||
@@ -472,8 +475,10 @@ if errorlevel 1 goto exit
|
||||
if "%test_args%"=="" goto test-v8
|
||||
if "%config%"=="Debug" set test_args=--mode=debug %test_args%
|
||||
if "%config%"=="Release" set test_args=--mode=release %test_args%
|
||||
if defined no_cctest echo Skipping cctest because no-cctest was specified && goto run-test-py
|
||||
echo running 'cctest %cctest_args%'
|
||||
"%config%\cctest" %cctest_args%
|
||||
:run-test-py
|
||||
call :run-python tools\test.py %test_args%
|
||||
goto test-v8
|
||||
|
||||
@@ -550,7 +555,7 @@ echo Failed to create vc project files.
|
||||
goto exit
|
||||
|
||||
:help
|
||||
echo vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-addons/test-addons-napi/test-internet/test-pummel/test-simple/test-message/test-gc/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] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [noperfctr] [licensetf] [sign] [ia32/x86/x64] [vs2015/vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean]
|
||||
echo vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-addons/test-addons-napi/test-internet/test-pummel/test-simple/test-message/test-gc/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] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [noperfctr] [licensetf] [sign] [ia32/x86/x64] [vs2015/vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [no-cctest]
|
||||
echo Examples:
|
||||
echo vcbuild.bat : builds release build
|
||||
echo vcbuild.bat debug : builds debug build
|
||||
@@ -560,6 +565,7 @@ echo vcbuild.bat build-release : builds the release distribution as
|
||||
echo vcbuild.bat enable-vtune : builds nodejs with Intel VTune profiling support to profile JavaScript
|
||||
echo vcbuild.bat link-module my_module.js : bundles my_module as built-in module
|
||||
echo vcbuild.bat lint : runs the C++ and JavaScript linter
|
||||
echo vcbuild.bat no-cctest : skip building cctest.exe
|
||||
goto exit
|
||||
|
||||
:run-python
|
||||
|
||||
Reference in new issue
Block a user