@@ -28,6 +28,7 @@ set target_env= |
28 | 28 | set noprojgen= |
29 | 29 | set projgen= |
30 | 30 | set clang_cl= |
| 31 | +set ccache_path= |
31 | 32 | set nobuild= |
32 | 33 | set sign= |
33 | 34 | set nosnapshot= |
@@ -87,6 +88,7 @@ if /i "%1"=="vs2022" set target_env=vs2022&goto arg-ok |
87 | 88 | if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok |
88 | 89 | if /i "%1"=="projgen" set projgen=1&goto arg-ok |
89 | 90 | if /i "%1"=="clang-cl" set clang_cl=1&goto arg-ok |
| 91 | +if /i "%1"=="ccache" set "ccache_path=%2%"&goto arg-ok-2 |
90 | 92 | if /i "%1"=="nobuild" set nobuild=1&goto arg-ok |
91 | 93 | if /i "%1"=="nosign" set "sign="&echo Note: vcbuild no longer signs by default. "nosign" is redundant.&goto arg-ok |
92 | 94 | if /i "%1"=="sign" set sign=1&goto arg-ok |
@@ -206,6 +208,7 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp |
206 | 208 | if defined openssl_no_asm set configure_flags=%configure_flags% --openssl-no-asm |
207 | 209 | if defined no_shared_roheap set configure_flags=%configure_flags% --disable-shared-readonly-heap |
208 | 210 | if defined DEBUG_HELPER set configure_flags=%configure_flags% --verbose |
| 211 | +if defined ccache_path set configure_flags=%configure_flags% --use-ccache-win |
209 | 212 | if defined compile_commands set configure_flags=%configure_flags% -C |
210 | 213 |
|
211 | 214 | if "%target_arch%"=="x86" ( |
@@ -364,6 +367,7 @@ if "%target%"=="Build" ( |
364 | 367 | if "%target%"=="node" if exist "%config%\cctest.exe" del "%config%\cctest.exe" |
365 | 368 | if "%target%"=="node" if exist "%config%\embedtest.exe" del "%config%\embedtest.exe" |
366 | 369 | if defined msbuild_args set "extra_msbuild_args=%extra_msbuild_args% %msbuild_args%" |
| 370 | +if defined ccache_path set "extra_msbuild_args=%extra_msbuild_args% /p:TrackFileAccess=false /p:CLToolPath=%ccache_path% /p:ForceImportAfterCppProps=%CD%\tools\msvs\props_4_ccache.props" |
367 | 371 | @rem Setup env variables to use multiprocessor build |
368 | 372 | set UseMultiToolTask=True |
369 | 373 | set EnforceProcessCountAcrossBuilds=True |
@@ -800,7 +804,7 @@ set exit_code=1 |
800 | 804 | goto exit |
801 | 805 |
|
802 | 806 | :help |
803 | | -echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-internet/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [clang-cl] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [nonpm] [nocorepack] [ltcg] [licensetf] [sign] [x64/arm64] [vs2022] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [format-md] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm] |
| 807 | +echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-internet/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [clang-cl] [ccache path-to-ccache] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [nonpm] [nocorepack] [ltcg] [licensetf] [sign] [x64/arm64] [vs2022] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [format-md] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm] |
804 | 808 | echo Examples: |
805 | 809 | echo vcbuild.bat : builds release build |
806 | 810 | echo vcbuild.bat debug : builds debug build |
@@ -811,6 +815,7 @@ echo vcbuild.bat enable-vtune : builds Node.js with Intel VTune pr |
811 | 815 | echo vcbuild.bat link-module my_module.js : bundles my_module as built-in module |
812 | 816 | echo vcbuild.bat lint : runs the C++, documentation and JavaScript linter |
813 | 817 | echo vcbuild.bat no-cctest : skip building cctest.exe |
| 818 | +echo vcbuild.bat ccache c:\ccache\ : use ccache to speed build |
814 | 819 | goto exit |
815 | 820 |
|
816 | 821 | :exit |
|