To build the native dependencies a docker
or podman
installation is required.
It is recomended to enable BuildKit
in docker.
Just run the following inside this directory:
$> docker build --build-arg TARGET=<TARGET> -o . .
or
$> podman build --jobs 4 --format docker --build-arg TARGET=<TARGET> -o . .
Where <TARGET>
is one of:
- x86_64-darwin-apple
- aarch64-darwin-apple
- x86_64-windows-gnu
- aarch64-windows-gnu
- x86_64-linux-gnu
- aarch64-linux-gnu
- x86_64-linux-musl
- aarch64-linux-musl
After some time (it takes aroung 1~2 hours in Github CI) a directory named out
will show up in the current directory containing our native dependencies.
- Fortify linux-musl shared libs:
- Add stack check/protector to linux-musl shared libs
- Add stack check to windows dlls whenever zig adds support to it:
https://github.com/ziglang/zig/blob/b3462b7/src/target.zig#L326-L329
- Add stack check/protector to linux arm64 glibc shared libs whenever zig fix the bug preventing it from working:
- Add support for pthread in windows builds:
https://github.com/GerHobbelt/pthread-win32 https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-libraries/winpthreads/ https://github.com/msys2/MINGW-packages/blob/f4bd368/mingw-w64-winpthreads-git/PKGBUILD
- Add libplacebo and vulkan support for apple builds through MoltenVK:
- Investigate why mediafoundation fails to link to ffmpeg's libav* libs for windows builds
- Add Metal shader support for ffmpeg in apple builds:
- Investigate why LTO fails at linking ffmpeg's libav* libs for windows builds
- Investigate why LTO fails when linking any static lib in apple builds:
This build system is losely base on:
It uses Zig 0.11 as a C/C++ toolchain to build the Windows and Linux targets:
It uses LLVM/Clang 16 with some tweaks from osxcross + Apple's cctools and linker to build the Darwin (macOS) targets:
- https://github.com/llvm/llvm-project/tree/llvmorg-16.0.6
- https://github.com/tpoechtrager/osxcross
- https://github.com/tpoechtrager/cctools-port
The pre-packaged macOS SDK comes from: https://github.com/joseluisq/macosx-sdks
By building the Darwin target you are agreeing with the Apple Public Source License (APSL) and the Xcode license terms
Thanks to all the developers involved in making the dependencies used in this project