Skip to content

Commit 97a602e

Browse files
committed
boringssl.sh: try suppressing warning in AWS-LC on Windows
``` /home/runner/work/curl-for-win/curl-for-win/awslc/crypto/rand_extra/windows.c:68:22: error: cast from 'FARPROC' (aka 'long long (*)()') to 'ProcessPrngFunction' (aka 'int (*)(unsigned char *, unsigned long long)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch] 68 | g_processprng_fn = (ProcessPrngFunction)GetProcAddress(hmod, "ProcessPrng"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ``` https://github.com/curl/curl-for-win/actions/runs/11711041033/job/32618698694#step:3:4180
1 parent 43a3668 commit 97a602e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

boringssl.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ _VER="$1"
6666
[ "${CW_DEV_INCREMENTAL:-}" != '1' ] && rm -r -f "${_PKGDIR:?}" "${_BLDDIR:?}"
6767

6868
CFLAGS="-ffile-prefix-map=$(pwd)="
69+
CPPFLAGS=''
6970
LIBS='-lpthread' # for tests
7071
options=''
7172

@@ -107,6 +108,8 @@ _VER="$1"
107108
options+=' -DDISABLE_GO=ON'
108109
options+=' -DDISABLE_PERL=ON'
109110

111+
CPPFLAGS+=' -Wno-cast-function-type-mismatch'
112+
110113
# Patch out to avoid redefinition errors
111114
sed -i.bak 's/-D_WIN32_WINNT=_WIN32_WINNT_WIN7//g' ./CMakeLists.txt
112115
else
@@ -127,8 +130,8 @@ _VER="$1"
127130
# shellcheck disable=SC2086
128131
cmake -B "${_BLDDIR}" ${_CMAKE_GLOBAL} ${_CMAKE_CXX_GLOBAL} ${options} \
129132
'-DBUILD_SHARED_LIBS=OFF' \
130-
"-DCMAKE_C_FLAGS=${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${_LDFLAGS_GLOBAL} ${LIBS}" \
131-
"-DCMAKE_CXX_FLAGS=${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${_LDFLAGS_GLOBAL} ${LIBS} ${_CXXFLAGS_GLOBAL} ${_LDFLAGS_CXX_GLOBAL}"
133+
"-DCMAKE_C_FLAGS=${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${CPPFLAGS} ${_LDFLAGS_GLOBAL} ${LIBS}" \
134+
"-DCMAKE_CXX_FLAGS=${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${CPPFLAGS} ${_LDFLAGS_GLOBAL} ${LIBS} ${_CXXFLAGS_GLOBAL} ${_LDFLAGS_CXX_GLOBAL}"
132135
fi
133136

134137
cmake --build "${_BLDDIR}" # --verbose

0 commit comments

Comments
 (0)