zmwangx / rust-ffmpeg-sys

FFmpeg bindings for Rust.
125 stars 86 forks source link

Cross-compilation fixes for Apple M1/x86 #30

Open kornelski opened 2 years ago

kornelski commented 2 years ago

Cross-compilation was assuming a setup typical for Linux. Cross-compilation from ARM macOS to Intel macOS has its own quirky requirements, because it uses the same system-global compiler, but needs different flags instead.

Also fixes a bug where cfg!(target_os) was used. build.rs runs on the host OS, so compilation target of build.rs is always the same as the host.

kornelski commented 2 years ago

@zmwangx Hello. Can you have a look at this?

Polochon-street commented 2 years ago

Hi! Thanks for your submission :) Could you fix the linting errors so we can see whether it builds successfully?

kornelski commented 2 years ago

This is still broken in 5.0.0.