summaryrefslogtreecommitdiff
path: root/tools/msvs
diff options
context:
space:
mode:
authorJoão Reis <reis@janeasystems.com>2018-03-24 22:56:59 +0000
committerShigeki Ohtsu <ohtsu@ohtsu.org>2018-04-10 06:45:45 +0900
commiteec659c138f3afcd51a25cd8b197d715a47baa65 (patch)
tree5df4a42ccfceb78cb660592661e4d068df2dd12a /tools/msvs
parentae096ba27cd26479e11a6610873957910da0beb0 (diff)
downloadandroid-node-v8-eec659c138f3afcd51a25cd8b197d715a47baa65.tar.gz
android-node-v8-eec659c138f3afcd51a25cd8b197d715a47baa65.tar.bz2
android-node-v8-eec659c138f3afcd51a25cd8b197d715a47baa65.zip
build, tools, win: add nasm detection for OpenSSL
OpenSSL-1.1.0 requires the nasm assembler for building asm files on Windows. This finds nasm at \Program Files\NASM\nasm.exe or \ProgramFiles(x86)\NASM\nasm.exe in vcbuild.bat for users who did not add its path in their enviroments. Fixes: https://github.com/nodejs/build/issues/1190 Fixes: https://github.com/nodejs/node/issues/4270 PR-URL: https://github.com/nodejs/node/pull/19794 Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'tools/msvs')
-rw-r--r--tools/msvs/find_nasm.cmd19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/msvs/find_nasm.cmd b/tools/msvs/find_nasm.cmd
new file mode 100644
index 0000000000..d30d213116
--- /dev/null
+++ b/tools/msvs/find_nasm.cmd
@@ -0,0 +1,19 @@
+@IF NOT DEFINED DEBUG_HELPER @ECHO OFF
+
+ECHO Looking for NASM
+
+FOR /F "delims=" %%a IN ('where nasm 2^> NUL') DO (
+ EXIT /B 0
+)
+
+IF EXIST "%ProgramFiles%\NASM\nasm.exe" (
+ SET "Path=%Path%;%ProgramFiles%\NASM"
+ EXIT /B 0
+)
+
+IF EXIST "%ProgramFiles(x86)%\NASM\nasm.exe" (
+ SET "Path=%Path%;%ProgramFiles(x86)%\NASM"
+ EXIT /B 0
+)
+
+EXIT /B 1