Possible to cross-compile from Linux to OSX?

Andre Pany andre at s-e-a-p.de
Tue Feb 4 21:19:56 UTC 2020


On Tuesday, 4 February 2020 at 19:30:13 UTC, H. S. Teoh wrote:
> So far, cross-compiling from Linux to Windows has been awesome, 
> thanks to LDC2's awesome cross-compiling capabilities. All I 
> needed to do was to download the Windows ldc2 release, edit 
> ldc2.conf to point to it, then compile with 
> -mtriple=x86_64-windows-msvc, and it magically all works.
>
> However, I'm having a tougher time cross-compiling to OSX... 
> downloaded the ldc2 osx release, setup ldc2.conf, and compile 
> with -mtriple=x86_64-apple-darwin, but it appears to be trying 
> to invoke my local Linux linker, which chokes on the OSX object 
> file format and dies horribly. :-P  I'm guessing I need to 
> somehow install an OSX toolchain for this to work?
>
>
> T

In case you have an open source project you also could have a 
look at Github Actions. It should allow you to compile your 
project for free to MacOS.

Kind regards
Andre


More information about the Digitalmars-d mailing list