Pass deployment target with -m*-version-min= by madsmtm · Pull Request #1339 · rust-lang/cc-rs (original) (raw)

Clang's supports many ways of passing the deployment target, and prefers that you use the -target flag for doing so.

This works poorly work with configuration files though, which Homebrew's LLVM uses, so we use the -mmacosx-version-min=, -miphoneos-version-min=, -mtargetos= etc. flags to pass the deployment target instead. See also discussion in Homebrew/homebrew-core#197532.

I will be submitting a similar PR to rustc at some point to fix this in there too.

Fixes #1278 (together with Homebrew/homebrew-core#197278).