What does HackerNews think of osxcross?
Mac OS X cross toolchain for Linux, FreeBSD, OpenBSD and Android (Termux)
https://github.com/tpoechtrager/osxcross
> Please ensure you have read and understood the Xcode license terms before continuing.
According to the EULA you may only use the SDK on Apple-branded computers. But you can use Linux to cross compile to Apple.
Do the Visual Studio build tools have more permissive license terms? AFAIK you can have clang-cl on Linux, but you do need a lot of the SDK for it to be useful. No experience there.
I build for OSX from Linux using clang all the time. You just need to grab the sdk from xcode and get your toolchain all setup.
It may not be a viable solution for every project, but it does work for many.
yes, I know osxcrooss but it is not legal to use if you aren't developing on apple hardware which makes it a bit cumbersome. Grep for "Authorized Test Units" in the xcode license linked in the repo.
It literally says (section 2.2, Permitted Uses and Restrictions):
"Install a reasonable number of copies of the Apple Software on Apple-branded computers"