When doing cross-compilation from Linux to MacOS we don't have
access to have access to xcodebuild and therefore need a way
to set the SDK version from the outside.
Fixes https://reviews.llvm.org/D68292#1853594 for me.
Differential D77026
Add manually overriding of the darwin SDK version vchuravy on Mar 29 2020, 6:43 PM. Authored by
Details When doing cross-compilation from Linux to MacOS we don't have Fixes https://reviews.llvm.org/D68292#1853594 for me.
Diff Detail
Event Timeline
Comment Actions @vchuravy LGTM. Just to note an alternative to this patch would be to implement a "barebones" version of xcrun that implements enough functionality to report the SDK to CMake. I think the compromise we came to is fine for now. If this patch becomes a maintenance burden in the future then we may need to revisit this. |
I do not want to support a cached SDK version. A variable that if set provides an override is fine but CMake's caching causes far too many problems already that I don't want a new one introduced.
So something like this...
I'd consider a reasonable compromise.
Then in your CMake invocations you can provide something like -DDARWIN_macosx_OVERRIDE_SDK_VERSION=10.12.