Skip to content

Commit b08126d

Browse files
committedDec 9, 2015
src: refactor vcbuild configure args creation
remove a bunch of variables and rely on %configure_flags% where possible, also allow for an external %config_flags% variable to supply additional arguments to configure to match the behaviour of the Makefile PR-URL: #3399 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: João Reis <[email protected]>
1 parent 939f305 commit b08126d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed
 

‎vcbuild.bat

+14-14
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ if /i "%1"=="/?" goto help
1515
set config=Release
1616
set target=Build
1717
set target_arch=x86
18-
set debug_arg=
19-
set snapshot_arg=
2018
set noprojgen=
2119
set nobuild=
2220
set nosign=
@@ -28,16 +26,15 @@ set licensertf=
2826
set jslint=
2927
set buildnodeweak=
3028
set noetw=
31-
set noetw_arg=
3229
set noetw_msi_arg=
3330
set noperfctr=
34-
set noperfctr_arg=
3531
set noperfctr_msi_arg=
3632
set i18n_arg=
3733
set download_arg=
3834
set release_urls_arg=
3935
set build_release=
4036
set enable_vtune_profiling=
37+
set configure_flags=
4138

4239
:next-arg
4340
if "%1"=="" goto args-done
@@ -63,7 +60,6 @@ if /i "%1"=="test-internet" set test_args=%test_args% internet&goto arg-ok
6360
if /i "%1"=="test-pummel" set test_args=%test_args% pummel&goto arg-ok
6461
if /i "%1"=="test-all" set test_args=%test_args% sequential parallel message gc internet pummel&set buildnodeweak=1&set jslint=1&goto arg-ok
6562
if /i "%1"=="jslint" set jslint=1&goto arg-ok
66-
@rem Include small-icu support with MSI installer
6763
if /i "%1"=="msi" set msi=1&set licensertf=1&set download_arg="--download=all"&set i18n_arg=small-icu&goto arg-ok
6864
if /i "%1"=="build-release" set build_release=1&goto arg-ok
6965
if /i "%1"=="upload" set upload=1&goto arg-ok
@@ -91,15 +87,18 @@ if defined build_release (
9187
set i18n_arg=small-icu
9288
)
9389

94-
if "%config%"=="Debug" set debug_arg=--debug
95-
if defined nosnapshot set snapshot_arg=--without-snapshot
96-
if defined noetw set noetw_arg=--without-etw& set noetw_msi_arg=/p:NoETW=1
97-
if defined noperfctr set noperfctr_arg=--without-perfctr& set noperfctr_msi_arg=/p:NoPerfCtr=1
98-
if defined RELEASE_URLBASE set release_urlbase_arg=--release-urlbase=%RELEASE_URLBASE%
90+
if "%config%"=="Debug" set configure_flags=%configure_flags% --debug
91+
if defined nosnapshot set configure_flags=%configure_flags% --without-snapshot
92+
if defined noetw set configure_flags=%configure_flags% --without-etw& set noetw_msi_arg=/p:NoETW=1
93+
if defined noperfctr set configure_flags=%configure_flags% --without-perfctr& set noperfctr_msi_arg=/p:NoPerfCtr=1
94+
if defined release_urlbase set release_urlbase_arg=--release-urlbase=%release_urlbase%
95+
if defined download_arg set configure_flags=%configure_flags% %download_arg%
9996

100-
if "%i18n_arg%"=="full-icu" set i18n_arg=--with-intl=full-icu
101-
if "%i18n_arg%"=="small-icu" set i18n_arg=--with-intl=small-icu
102-
if "%i18n_arg%"=="intl-none" set i18n_arg=--with-intl=none
97+
if "%i18n_arg%"=="full-icu" set configure_flags=%configure_flags% --with-intl=full-icu
98+
if "%i18n_arg%"=="small-icu" set configure_flags=%configure_flags% --with-intl=small-icu
99+
if "%i18n_arg%"=="intl-none" set configure_flags=%configure_flags% --with-intl=none
100+
101+
if defined config_flags set configure_flags=%configure_flags% %config_flags%
103102

104103
if not exist "%~dp0deps\icu" goto no-depsicu
105104
if "%target%"=="Clean" echo deleting %~dp0deps\icu
@@ -170,7 +169,8 @@ goto run
170169
if defined noprojgen goto msbuild
171170

172171
@rem Generate the VS project.
173-
python configure %download_arg% %i18n_arg% %debug_arg% %snapshot_arg% %noetw_arg% %noperfctr_arg% %enable_vtune_profiling% --dest-cpu=%target_arch% --tag=%TAG%
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%
174174
if errorlevel 1 goto create-msvs-files-failed
175175
if not exist node.sln goto create-msvs-files-failed
176176
echo Project files generated.

0 commit comments

Comments
 (0)