Skip to content

Commit cd4766d

Browse files
shigekijasnell
authored andcommitted
build, win: opt-in openssl_no_asm if no nasm found
Instead of automatically falling back to openssl_no_asm with warning if no nasm is found during build on Windows, this stops vcbuild.bat and requires users to specify openssl_no_asm option explicitly. Fixes: #19918 PR-URL: #19943 Refs: #19930 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]>
1 parent 31b5ed4 commit cd4766d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

BUILDING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ Prerequisites:
258258
* Basic Unix tools required for some tests,
259259
[Git for Windows](http://git-scm.com/download/win) includes Git Bash
260260
and tools which can be included in the global `PATH`.
261-
* **Optional** (for OpenSSL assembler modules): the [NetWide Assembler](http://www.nasm.us/),
262-
if not installed in the default location it needs to be manually added
263-
to `PATH`.
261+
* The [NetWide Assembler](http://www.nasm.us/), for OpenSSL assembler modules.
262+
If not installed in the default location, it needs to be manually added
263+
to `PATH`. Build with `openssl-no-asm` option does not require this.
264264
* **Optional** (to build the MSI): the [WiX Toolset v3.11](http://wixtoolset.org/releases/)
265265
and the [Wix Toolset Visual Studio 2017 Extension](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension).
266266

vcbuild.bat

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ set http2_debug=
5252
set nghttp2_debug=
5353
set link_module=
5454
set no_cctest=
55+
set openssl_no_asm=
5556

5657
:next-arg
5758
if "%1"=="" goto args-done
@@ -117,6 +118,7 @@ if /i "%1"=="debug-http2" set debug_http2=1&goto arg-ok
117118
if /i "%1"=="debug-nghttp2" set debug_nghttp2=1&goto arg-ok
118119
if /i "%1"=="link-module" set "link_module= --link-module=%2%link_module%"&goto arg-ok-2
119120
if /i "%1"=="no-cctest" set no_cctest=1&goto arg-ok
121+
if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
120122

121123
echo Error: invalid command line option `%1`.
122124
exit /b 1
@@ -161,6 +163,7 @@ if defined link_module set configure_flags=%configure_flags% %link_module%
161163
if defined i18n_arg set configure_flags=%configure_flags% --with-intl=%i18n_arg%
162164
if defined config_flags set configure_flags=%configure_flags% %config_flags%
163165
if defined target_arch set configure_flags=%configure_flags% --dest-cpu=%target_arch%
166+
if defined openssl_no_asm set configure_flags=%configure_flags% --openssl-no-asm
164167

165168
if not exist "%~dp0deps\icu" goto no-depsicu
166169
if "%target%"=="Clean" echo deleting %~dp0deps\icu
@@ -170,8 +173,8 @@ if "%target%"=="Clean" rmdir /S /Q %~dp0deps\icu
170173
call tools\msvs\find_python.cmd
171174
if errorlevel 1 goto :exit
172175

173-
call tools\msvs\find_nasm.cmd
174-
if errorlevel 1 echo Could not find NASM, it will not be used.
176+
if not defined openssl_no_asm call tools\msvs\find_nasm.cmd
177+
if errorlevel 1 echo Could not find NASM, install it or build with openssl-no-asm. See BUILDING.md.
175178

176179
call :getnodeversion || exit /b 1
177180

@@ -547,7 +550,7 @@ echo Failed to create vc project files.
547550
goto exit
548551

549552
:help
550-
echo vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-addons/test-addons-napi/test-internet/test-pummel/test-simple/test-message/test-gc/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [noperfctr] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [no-cctest]
553+
echo vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-addons/test-addons-napi/test-internet/test-pummel/test-simple/test-message/test-gc/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [noperfctr] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [no-cctest] [openssl-no-asm]
551554
echo Examples:
552555
echo vcbuild.bat : builds release build
553556
echo vcbuild.bat debug : builds debug build

0 commit comments

Comments
 (0)