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.
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 ofbuild.rs
is always the same as the host.