Skip to content

Commit 260d0a1

Browse files
committed
build: merge opts from nginx master
* Win32: skip building OpenSSL tests to conserve time and space. nginx/nginx@7c7d327 * Win32: preserving binary compatibility with Windows XP - Vista. nginx/nginx@ce912de * Win32: avoid using CFLAGS, just add define instead. nginx/nginx@09752fc
1 parent a0258e4 commit 260d0a1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

nginx-build-msys2.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ echo $PCRE
3737
OPENSSL="$(curl -s 'https://www.openssl.org/source/' | grep -ioP 'openssl-(\d+\.)+[a-z\d]+' | sort -ruV | head -1)"
3838
OPENSSL="${OPENSSL:-openssl-1.1.1b}"
3939
echo $OPENSSL
40+
4041
# clone and patch nginx
4142
if [[ -d nginx ]]; then
4243
cd nginx
@@ -114,7 +115,9 @@ configure_args=(
114115
--prefix=
115116
)
116117
echo ${configure_args[@]}
117-
auto/configure ${configure_args[@]} --with-cc-opt='-s -O2 -fno-strict-aliasing -pipe'
118+
auto/configure ${configure_args[@]} \
119+
--with-cc-opt='-s -O2 -fno-strict-aliasing -pipe' \
120+
--with-openssl-opt='no-tests -D_WIN32_WINNT=0x0501'
118121

119122
# build
120123
make -j$(nproc)
@@ -124,7 +127,9 @@ mv -f "objs/nginx.exe" "../nginx-${version}-${machine_str}.exe"
124127

125128
# re-configure with debugging log
126129
configure_args+=(--with-debug)
127-
auto/configure ${configure_args[@]} --with-cc-opt='-O2 -fno-strict-aliasing -pipe'
130+
auto/configure ${configure_args[@]} \
131+
--with-cc-opt='-O2 -fno-strict-aliasing -pipe' \
132+
--with-openssl-opt='no-tests -D_WIN32_WINNT=0x0501'
128133

129134
# re-build with debugging log
130135
make -j$(nproc)

0 commit comments

Comments
 (0)