summaryrefslogtreecommitdiffhomepage
path: root/auto/cc
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2023-02-23 18:16:08 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2023-02-23 18:16:08 +0300
commitdad6ec3aa63fbd3b427d74842fa659f7a0b82f3b (patch)
tree83dbe41a2c059d7b78f2e6579175072b2a099ee0 /auto/cc
parent62b790c3318a56971e461a1e1f5b79197b604e89 (diff)
downloadnginx-dad6ec3aa63fbd3b427d74842fa659f7a0b82f3b.tar.gz
nginx-dad6ec3aa63fbd3b427d74842fa659f7a0b82f3b.tar.bz2
Win32: OpenSSL compilation for x64 targets with MSVC.
To ensure proper target selection the NGX_MACHINE variable is now set based on the MSVC compiler output, and the OpenSSL target is set based on it. This is not important as long as "no-asm" is used (as in misc/GNUmakefile and win32 build instructions), but might be beneficial if someone is trying to build OpenSSL with assembler code.
Diffstat (limited to 'auto/cc')
-rw-r--r--auto/cc/msvc15
1 files changed, 15 insertions, 0 deletions
diff --git a/auto/cc/msvc b/auto/cc/msvc
index d4c0be4c3..567bac7bc 100644
--- a/auto/cc/msvc
+++ b/auto/cc/msvc
@@ -22,6 +22,21 @@ have=NGX_COMPILER value="\"cl $NGX_MSVC_VER\"" . auto/define
ngx_msvc_ver=`echo $NGX_MSVC_VER | sed -e 's/^\([0-9]*\).*/\1/'`
+# detect x64 builds
+
+case "$NGX_MSVC_VER" in
+
+ *x64)
+ NGX_MACHINE=amd64
+ ;;
+
+ *)
+ NGX_MACHINE=i386
+ ;;
+
+esac
+
+
# optimizations
# maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy