@@ -50,6 +50,7 @@ set v8_build_options=
50
50
set " common_test_suites = %js_test_suites% doctool addons addons-napi&set build_addons=1&set build_addons_napi=1"
51
51
set http2_debug =
52
52
set nghttp2_debug =
53
+ set link_module =
53
54
54
55
:next-arg
55
56
if " %1 " == " " goto args-done
@@ -111,11 +112,13 @@ if /i "%1"=="static" set enable_static=1&goto arg-ok
111
112
if /i " %1 " == " no-NODE-OPTIONS" set no_NODE_OPTIONS = 1& goto arg-ok
112
113
if /i " %1 " == " debug-http2" set debug_http2 = 1& goto arg-ok
113
114
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
114
116
115
117
echo Error: invalid command line option `%1 `.
116
118
exit /b 1
117
119
118
- :arg-ok
120
+ :arg-ok-2
121
+ shift
119
122
:arg-ok
120
123
shift
121
124
goto next-arg
@@ -245,7 +248,7 @@ goto run
245
248
if defined noprojgen goto msbuild
246
249
247
250
@ 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%
249
252
if errorlevel 1 goto create-msvs-files-failed
250
253
if not exist node.sln goto create-msvs-files-failed
251
254
echo Project files generated.
@@ -522,14 +525,15 @@ echo Failed to create vc project files.
522
525
goto exit
523
526
524
527
: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]
526
529
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
533
537
goto exit
534
538
535
539
:run-python
0 commit comments