diff --git a/common.gypi b/common.gypi index 148fc15d6915ec..a3433e0ddc6bfa 100644 --- a/common.gypi +++ b/common.gypi @@ -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 + ], }, }, } diff --git a/vcbuild.bat b/vcbuild.bat index 843c0ec99ceaed..89c495de0d09cc 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -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