You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build(darwin): fix macOS arm64 compilation and enable VideoToolbox
Resolve three blocking issues for building FFmpeg and 20 dependencies on
macOS arm64 within Nix development environment:
- Force clang compiler via FFmpeg configure flags and build environment
- Disable x264 assembly on Apple Silicon (GNU macro incompatibility with
LLVM)
- Build rav1e without git_version feature to avoid libgit2/libiconv
dependency
- Configure C++ header search order with -nostdinc++ and explicit libc++
path
- Filter NIX_CFLAGS_COMPILE to prevent incorrect -isystem injection
- Use Apple's /usr/bin/libtool instead of GNU libtool for library
combining
- Add VideoToolbox hardware encoder support (H.264, HEVC, ProRes)
- Export LIBCXX_INCLUDE from flake.nix for C++ dependency builds
Root cause: Nix dev shell provides both GCC and Clang, but CGO_CFLAGS
points to Clang's builtin headers containing preprocessor features
(__has_feature, __building_module) that GCC doesn't recognise.
Verified: All 17 platform-applicable libraries build successfully,
combine into lib/darwin_arm64/libffmpeg.a (63MB), tests pass,
VideoToolbox encoders confirmed present.
Signed-off-by: Martin Wimpress <martin@wimpress.org>
0 commit comments