mirror of
https://github.com/curl/curl.git
synced 2026-04-29 05:42:16 +03:00
autotools: add support for mingw UWP builds
To match cmake builds. - GHA/windows: allow autotools UWP builds. - detect UWP and add to `buildinfo.txt`. Consider it enabled if `CPPFLAGS` contains `-DWINSTORECOMPAT`. - disable telnet with UWP. - enable Unicode with UWP. - do not use `wldap32` with UWP. - do not enable `USE_WIN32_CRYPTO` with UWP. - make sure to link to `ws2_32` in UWP builds. To fix `undefined reference to `in6addr_any'` when linking `tests/server` programs. More in the comment. Closes #16020
This commit is contained in:
parent
fb881abd72
commit
f7bb6c1f64
3 changed files with 58 additions and 33 deletions
34
.github/workflows/windows.yml
vendored
34
.github/workflows/windows.yml
vendored
|
|
@ -169,17 +169,18 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !1233', config: '--enable-debug --disable-threaded-resolver --disable-proxy', name: '!proxy' }
|
||||
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --disable-threaded-resolver', name: 'default' }
|
||||
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !1233', config: '--enable-debug --with-openssl --disable-threaded-resolver --disable-proxy', name: '!proxy' }
|
||||
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --with-openssl --disable-threaded-resolver', name: 'default' }
|
||||
- { build: 'cmake' , sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '-DENABLE_DEBUG=ON -DENABLE_THREADED_RESOLVER=OFF', name: 'default' }
|
||||
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '', name: 'default R' }
|
||||
- { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --disable-threaded-resolver --disable-curldebug --enable-static=no --without-zlib', name: 'default' }
|
||||
- { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: '' , config: '--enable-debug --enable-windows-unicode --enable-ares', name: 'c-ares U' }
|
||||
- { build: 'autotools', sys: 'msys' , env: 'x86_64' , tflags: '!19 !504 !704 !705 !1233', config: '--with-openssl', name: 'default R' }
|
||||
- { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '--enable-debug --with-openssl --disable-threaded-resolver --disable-curldebug --enable-static=no --without-zlib', name: 'default' }
|
||||
- { build: 'autotools', sys: 'mingw64', env: 'x86_64' , tflags: '' , config: '--enable-debug --with-openssl --enable-windows-unicode --enable-ares', name: 'c-ares U' }
|
||||
# FIXME: WebSockets test results ignored due to frequent failures on native Windows:
|
||||
- { build: 'cmake' , sys: 'mingw64', env: 'x86_64' , tflags: '' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_ARES=ON', type: 'Debug', name: 'schannel c-ares U' }
|
||||
- { build: 'cmake' , sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DENABLE_CURLDEBUG=ON', type: 'Release', name: 'schannel R TrackMemory' }
|
||||
- { build: 'cmake' , sys: 'clang64', env: 'clang-x86_64', tflags: 'skiprun' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=OFF -DCURL_USE_OPENSSL=ON -DENABLE_UNICODE=OFF', type: 'Release', name: 'openssl' }
|
||||
- { build: 'cmake' , sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON', type: 'Release', test: 'uwp', name: 'schannel' }
|
||||
# { build: 'autotools', sys: 'ucrt64' , env: 'ucrt-x86_64' , tflags: 'skiprun' , config: '--without-debug --with-schannel --enable-shared', type: 'Release', test: 'uwp', name: 'schannel' }
|
||||
- { build: 'cmake' , sys: 'mingw64', env: 'x86_64' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=ON -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON -DCMAKE_VERBOSE_MAKEFILE=ON', type: 'Debug', cflags: '-DCURL_SCHANNEL_DEV_DEBUG', name: 'schannel dev debug' }
|
||||
- { build: 'cmake' , sys: 'mingw32', env: 'i686' , tflags: 'skiprun' , config: '-DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=ON -DCURL_USE_SCHANNEL=ON -DENABLE_UNICODE=ON', type: 'Release', name: 'schannel R' }
|
||||
fail-fast: false
|
||||
|
|
@ -228,33 +229,34 @@ jobs:
|
|||
- name: 'configure'
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
if [ '${{ matrix.test }}' = 'uwp' ]; then
|
||||
CPPFLAGS='-DWINSTORECOMPAT -DWINAPI_FAMILY=WINAPI_FAMILY_APP'
|
||||
if [[ '${{ matrix.env }}' != 'clang'* ]]; then
|
||||
specs="$(realpath gcc-specs-uwp)"
|
||||
gcc -dumpspecs | sed -e 's/-lmingwex/-lwindowsapp -lmingwex -lwindowsapp/' -e 's/-lmsvcrt/-lucrtapp/' > "${specs}"
|
||||
CFLAGS="-specs=${specs}"
|
||||
CFLAGS_CMAKE="-specs=$(cygpath -w "${specs}")"
|
||||
fi
|
||||
fi
|
||||
if [ '${{ matrix.build }}' = 'cmake' ]; then
|
||||
if [[ '${{ matrix.env }}' = 'clang'* ]]; then
|
||||
options='-DCMAKE_C_COMPILER=clang'
|
||||
else
|
||||
options='-DCMAKE_C_COMPILER=gcc'
|
||||
fi
|
||||
if [ '${{ matrix.test }}' = 'uwp' ]; then
|
||||
options+=' -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0'
|
||||
cflags='-DWINSTORECOMPAT -DWINAPI_FAMILY=WINAPI_FAMILY_APP'
|
||||
if [[ '${{ matrix.env }}' != 'clang'* ]]; then
|
||||
specs="$(realpath gcc-specs-uwp)"
|
||||
gcc -dumpspecs | sed -e 's/-lmingwex/-lwindowsapp -lmingwex -lwindowsapp/' -e 's/-lmsvcrt/-lucrtapp/' > "${specs}"
|
||||
cflags+=" -specs=$(cygpath -w "${specs}")"
|
||||
fi
|
||||
fi
|
||||
[ '${{ matrix.test }}' = 'uwp' ] && options+=' -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0'
|
||||
[ '${{ matrix.type }}' = 'Debug' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG='
|
||||
[ '${{ matrix.type }}' = 'Release' ] && options+=' -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE='
|
||||
cmake -B bld -G Ninja ${options} \
|
||||
"-DCMAKE_C_FLAGS=${{ matrix.cflags }} ${cflags}" \
|
||||
"-DCMAKE_C_FLAGS=${{ matrix.cflags }} ${CFLAGS_CMAKE} ${CPPFLAGS}" \
|
||||
'-DCMAKE_BUILD_TYPE=${{ matrix.type }}' \
|
||||
-DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
|
||||
-DCURL_WERROR=ON \
|
||||
${{ matrix.config }}
|
||||
else
|
||||
export CFLAGS CPPFLAGS
|
||||
mkdir bld && cd bld && ../configure --enable-unity --enable-test-bundles --enable-warnings --enable-werror \
|
||||
--prefix="${HOME}"/install \
|
||||
--with-openssl \
|
||||
--with-libssh2 \
|
||||
--disable-dependency-tracking \
|
||||
${{ matrix.config }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue