Skip to content

How to target older SDK than host macOS #4808

Discussion options

You must be logged in to vote

Not officially, but the idea of how to do this would be to trick MacOS.full_version (or sw_vers) and then pretty much everything else will work from there. Internally we have a HOMEBREW_FAKE_EL_CAPITAN, but that doesn't extend to arbitrary versions.

When doing anything like this though, I recommend enabling cross-compiling in any configure scripts (e.g. --build=aarch64-apple-darwin22 --host=aarch64-apple-darwin20). That is because some may do runtime tests when cross-compiling is disabled, which will misconfigure your build for your target.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jeroen
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants