Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/native-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ jobs:
platform: arm64
libc: musl
runtime: alpine:3.22
# see jni/build-windows.sh
- classifier: windows-x86_64
family: windows
runner: windows-2022
msystem: MINGW64
package-prefix: mingw-w64-x86_64
compiler: gcc
msystem: CLANG64
package-prefix: mingw-w64-clang-x86_64
compiler: clang
task: compileNativeForWindowsX8664
directory: windows-x86_64
library: libdatachannel-java.dll
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Build one Linux native with, for example:
The CI matrix builds all eight Linux, Windows, and macOS targets concurrently
on matching x86_64 or ARM64 runners. Only musl uses a container (Alpine 3.22);
glibc builds use GCC 12 and OpenSSL from Ubuntu 22.04, Windows builds use native
MSYS2 MINGW64/CLANGARM64 with static OpenSSL, and macOS builds use the host
MSYS2 CLANG64/CLANGARM64 with static OpenSSL, and macOS builds use the host
toolchain. Install the corresponding build dependencies for local builds.

Every job checks lazy and eager loading of the packaged bundle in a matching
Expand Down
17 changes: 12 additions & 5 deletions jni/build-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ case "$TARGET_CLASSIFIER:$MSYSTEM" in
cxx_compiler=clang++
expected_target=aarch64-w64-windows-gnu
;;
windows-x86_64:MINGW64)
compiler=gcc
cxx_compiler=g++
expected_target=x86_64-w64-mingw32
windows-x86_64:CLANG64)
# replaced gcc & libstdc++ with clang & libc++
# (https://github.com/GeyserMC/Geyser/issues/6920) - libstdc++ seems to be leaking handles on windows...
# apparently its mutex handling doesn't destroy pthreads if a static initializer exists... which is all fine and dandy on linux,
# but windows's handling (dubbed winpthreads), in its infinite wisdom, seems to do shenanigans where events and sempahores aren't freed until destroy
# >> et voila, you get like 50-100 handles leaking every time
# had to hunt these down, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59807 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107857 both describe this issue
# alas, libc++ on the other hand, doesn't have this issue
compiler=clang
cxx_compiler=clang++
expected_target=x86_64-w64-windows-gnu
;;
*)
echo "Use CLANGARM64 on Windows ARM64 or MINGW64 on Windows x86_64" >&2
echo "Use CLANGARM64 on Windows ARM64 or CLANG64 on Windows x86_64" >&2
exit 1
;;
esac
Expand Down