Mercurial > hg > nginx
diff auto/cc/msvc @ 8129:3c4d81ea1338
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 23 Feb 2023 18:16:08 +0300 |
parents | 17b3efb45b17 |
children |
line wrap: on
line diff
--- a/auto/cc/msvc +++ b/auto/cc/msvc @@ -22,6 +22,21 @@ have=NGX_COMPILER value="\"cl $NGX_MSVC_ 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