Skip to content

Commit 4383acd

Browse files
committed
build: fix and refactor VTune config in vcbuild.bat
PR-URL: #4192 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent be0b0b8 commit 4383acd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

vcbuild.bat

+6-5
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ set i18n_arg=
3333
set download_arg=
3434
set release_urls_arg=
3535
set build_release=
36-
set enable_vtune_profiling=
36+
set enable_vtune_arg=
3737
set configure_flags=
3838

3939
:next-arg
@@ -68,7 +68,7 @@ if /i "%1"=="full-icu" set i18n_arg=%1&goto arg-ok
6868
if /i "%1"=="intl-none" set i18n_arg=%1&goto arg-ok
6969
if /i "%1"=="download-all" set download_arg="--download=all"&goto arg-ok
7070
if /i "%1"=="ignore-flaky" set test_args=%test_args% --flaky-tests=dontcare&goto arg-ok
71-
if /i "%1"=="enable-vtune" set enable_vtune_profiling="--enable-vtune-profiling"&goto arg-ok
71+
if /i "%1"=="enable-vtune" set enable_vtune_arg=1&goto arg-ok
7272

7373
echo Warning: ignoring invalid command line option `%1`.
7474

@@ -93,6 +93,7 @@ if defined noetw set configure_flags=%configure_flags% --without-etw& set noetw_
9393
if defined noperfctr set configure_flags=%configure_flags% --without-perfctr& set noperfctr_msi_arg=/p:NoPerfCtr=1
9494
if defined release_urlbase set release_urlbase_arg=--release-urlbase=%release_urlbase%
9595
if defined download_arg set configure_flags=%configure_flags% %download_arg%
96+
if defined enable_vtune_arg set configure_flags=%configure_flags% --enable-vtune-profiling
9697

9798
if "%i18n_arg%"=="full-icu" set configure_flags=%configure_flags% --with-intl=full-icu
9899
if "%i18n_arg%"=="small-icu" set configure_flags=%configure_flags% --with-intl=small-icu
@@ -169,8 +170,8 @@ goto run
169170
if defined noprojgen goto msbuild
170171

171172
@rem Generate the VS project.
172-
echo configure %configure_flags% %enable_vtune_profiling% --dest-cpu=%target_arch% --tag=%TAG%
173-
python configure %configure_flags% %enable_vtune_profiling% --dest-cpu=%target_arch% --tag=%TAG%
173+
echo configure %configure_flags% --dest-cpu=%target_arch% --tag=%TAG%
174+
python configure %configure_flags% --dest-cpu=%target_arch% --tag=%TAG%
174175
if errorlevel 1 goto create-msvs-files-failed
175176
if not exist node.sln goto create-msvs-files-failed
176177
echo Project files generated.
@@ -268,7 +269,7 @@ echo vcbuild.bat debug : builds debug build
268269
echo vcbuild.bat release msi : builds release build and MSI installer package
269270
echo vcbuild.bat test : builds debug build and runs tests
270271
echo vcbuild.bat build-release : builds the release distribution as used by nodejs.org
271-
echo vcbuild.bat enable-vtune : builds nodejs with Intel Vtune profiling support to profile JavaScript
272+
echo vcbuild.bat enable-vtune : builds nodejs with Intel VTune profiling support to profile JavaScript
272273
goto exit
273274

274275
:exit

0 commit comments

Comments
 (0)