[vlc-commits] [Git][videolan/vlc][master] 3 commits: package/win32: detect we build with a UCRT toolchain
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Jan 28 09:48:05 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
23fac246 by Steve Lhomme at 2023-01-28T09:32:40+00:00
package/win32: detect we build with a UCRT toolchain
- - - - -
98f77b7e by Steve Lhomme at 2023-01-28T09:32:40+00:00
package/win32: avoid verbose errors when checking for clang
- - - - -
5d219486 by Steve Lhomme at 2023-01-28T09:32:40+00:00
package/win32: detect when UCRT is enabled without a UCRT toolchain
- - - - -
1 changed file:
- extras/package/win32/build.sh
Changes:
=====================================
extras/package/win32/build.sh
=====================================
@@ -138,12 +138,19 @@ TRIPLET=$ARCH-w64-mingw32
# Check if compiling with clang
CC=${CC:-$TRIPLET-gcc}
-if ! printf "#ifdef __clang__\n#error CLANG\n#endif" | $CC -E -; then
+if ! printf "#ifdef __clang__\n#error CLANG\n#endif" | $CC -E - 1>/dev/null 2>/dev/null; then
COMPILING_WITH_CLANG=1
else
COMPILING_WITH_CLANG=0
fi
+# Check if this is a UCRT toolchain
+if printf "#include <crtdefs.h>\n#if defined(_UCRT) || (__MSVCRT_VERSION__ >= 0x1400) || (__MSVCRT_VERSION__ >= 0xE00 && __MSVCRT_VERSION__ < 0x1000)\n# error This is a UCRT build\n#endif" | $CC -E - 1>/dev/null 2>/dev/null; then
+ COMPILING_WITH_UCRT=0
+else
+ COMPILING_WITH_UCRT=1
+fi
+
info "Building extra tools"
mkdir -p extras/tools
cd extras/tools
@@ -179,6 +186,12 @@ cd ../../
CONTRIB_PREFIX=$TRIPLET
if [ ! -z "$BUILD_UCRT" ]; then
+
+ if [ ! "$COMPILING_WITH_UCRT" -gt 0 ]; then
+ echo "UCRT builds need a UCRT toolchain"
+ exit 1
+ fi
+
if [ ! -z "$WINSTORE" ]; then
CONTRIBFLAGS="$CONTRIBFLAGS --disable-disc --disable-srt --disable-sdl --disable-SDL_image --disable-caca"
# modplug uses GlobalAlloc/Free and lstrcpyA/wsprintfA/lstrcpynA
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4657ba2647ca051294dc5fce38a38488e775bb95...5d219486314740ca005d55dc1320d491b7052d39
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4657ba2647ca051294dc5fce38a38488e775bb95...5d219486314740ca005d55dc1320d491b7052d39
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list