I'm building a AU audio plugin for macOS that links against a static Rust library compiled with Cargo. I compile my plugin via CMake with a macOS deployment target set to 10.9. At link time, I get tons of errors like
ld: warning: object file (my/rust/libfoo.a (std-bd716fa574aff005.std.8vdpzfpj-cgu.15.rcgu.o)) was built for newer macOS version (10.15) than being linked (10.9)
A tester running MacOS 10.13 confirmed that loading the plug-in leads to a crash.
I need to compile the Rust library for a macOS deployment target of 10.9 too, but how do I do that?
The library I'm compiling is resvg, I modified the projects Cargo.toml to output a static library in my own fork, which you will find here.
I invoke cargo build --release and my static library is compiled.
Running
otool -l libresvg.a | rg LC_VERSION_MIN_MACOSX -A2 | sort | uniq
outputs
cmdsize 16
version 10.15
version 10.7