Browse Source

fix(build): Add std threading support in Windows build

Use posix versions of mingw toolchains, which say:
> This package contains the C++ compiler, supporting cross-compiling to
64-bit MinGW-w64 targets, using the POSIX threading model.

Fix build failure saying that std::mutex was not declared
reviewable/pr6399/r1
Anthony Bilinski 4 years ago
parent
commit
057f921ace
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 4
      windows/cross-compile/build.sh

4
windows/cross-compile/build.sh

@ -152,11 +152,15 @@ then @@ -152,11 +152,15 @@ then
apt-get install -y --no-install-recommends \
g++-mingw-w64-i686 \
gcc-mingw-w64-i686
update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
elif [[ "$ARCH" == "x86_64" ]]
then
apt-get install -y --no-install-recommends \
g++-mingw-w64-x86-64 \
gcc-mingw-w64-x86-64
update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
fi

Loading…
Cancel
Save