Skip to content

Commit 8ceb08a

Browse files
bzozStephen Belanger
authored and
Stephen Belanger
committed
build: add support for link-module to vcbuild
Adds support for link-module option to vcbuild.bat. PR-URL: nodejs/node#15410 Fixes: nodejs/node#15377 Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent 93616ed commit 8ceb08a

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

vcbuild.bat

+13-9
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ set v8_build_options=
5050
set "common_test_suites=%js_test_suites% doctool addons addons-napi&set build_addons=1&set build_addons_napi=1"
5151
set http2_debug=
5252
set nghttp2_debug=
53+
set link_module=
5354

5455
:next-arg
5556
if "%1"=="" goto args-done
@@ -111,11 +112,13 @@ if /i "%1"=="static" set enable_static=1&goto arg-ok
111112
if /i "%1"=="no-NODE-OPTIONS" set no_NODE_OPTIONS=1&goto arg-ok
112113
if /i "%1"=="debug-http2" set debug_http2=1&goto arg-ok
113114
if /i "%1"=="debug-nghttp2" set debug_nghttp2=1&goto arg-ok
115+
if /i "%1"=="link-module" set "link_module= --link-module=%2%link_module%"&goto arg-ok-2
114116

115117
echo Error: invalid command line option `%1`.
116118
exit /b 1
117119

118-
:arg-ok
120+
:arg-ok-2
121+
shift
119122
:arg-ok
120123
shift
121124
goto next-arg
@@ -245,7 +248,7 @@ goto run
245248
if defined noprojgen goto msbuild
246249

247250
@rem Generate the VS project.
248-
call :run-python configure %configure_flags% --dest-cpu=%target_arch% --tag=%TAG%
251+
call :run-python configure %configure_flags% --dest-cpu=%target_arch% --tag=%TAG% %link_module%
249252
if errorlevel 1 goto create-msvs-files-failed
250253
if not exist node.sln goto create-msvs-files-failed
251254
echo Project files generated.
@@ -522,14 +525,15 @@ echo Failed to create vc project files.
522525
goto exit
523526

524527
:help
525-
echo vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-uv/test-inspector/test-internet/test-pummel/test-simple/test-message/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [clean] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [sign] [x86/x64] [vs2015/vs2017] [download-all] [enable-vtune] [lint/lint-ci] [no-NODE-OPTIONS]
528+
echo vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-uv/test-inspector/test-internet/test-pummel/test-simple/test-message/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [clean] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [sign] [x86/x64] [vs2015/vs2017] [download-all] [enable-vtune] [lint/lint-ci] [no-NODE-OPTIONS] [link-module path-to-module]
526529
echo Examples:
527-
echo vcbuild.bat : builds release build
528-
echo vcbuild.bat debug : builds debug build
529-
echo vcbuild.bat release msi : builds release build and MSI installer package
530-
echo vcbuild.bat test : builds debug build and runs tests
531-
echo vcbuild.bat build-release : builds the release distribution as used by nodejs.org
532-
echo vcbuild.bat enable-vtune : builds nodejs with Intel VTune profiling support to profile JavaScript
530+
echo vcbuild.bat : builds release build
531+
echo vcbuild.bat debug : builds debug build
532+
echo vcbuild.bat release msi : builds release build and MSI installer package
533+
echo vcbuild.bat test : builds debug build and runs tests
534+
echo vcbuild.bat build-release : builds the release distribution as used by nodejs.org
535+
echo vcbuild.bat enable-vtune : builds nodejs with Intel VTune profiling support to profile JavaScript
536+
echo vcbuild.bat link-module my_module.js : bundles my_module as built-in module
533537
goto exit
534538

535539
:run-python

0 commit comments

Comments
 (0)