www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Building macOS universal binaries

reply Piotr Fusik <fox scene.no-spam.pl> writes:
Can LDC produce binaries for both Intel and Apple silicon CPUs?
Sep 03
next sibling parent reply kinke <noone nowhere.com> writes:
On Thursday, 3 September 2026 at 08:18:13 UTC, Piotr Fusik wrote:
 Can LDC produce binaries for both Intel and Apple silicon CPUs?
Not at once - you can build the binaries for both architectures (using the prebuilt universal macOS package with out-of-the-box cross-compilation support for the other Apple targets), and then merge them via Apple's `lipo` tool: https://github.com/ldc-developers/ldc/blob/089b5820596c8a078f590b688375622c9fe8c8d5/.github/actions/merge-macos/action.yml#L35
Sep 03
parent reply Piotr Fusik <fox scene.no-spam.pl> writes:
On Thursday, 3 September 2026 at 11:05:03 UTC, kinke wrote:
 On Thursday, 3 September 2026 at 08:18:13 UTC, Piotr Fusik 
 wrote:
 Can LDC produce binaries for both Intel and Apple silicon CPUs?
Not at once - you can build the binaries for both architectures (using the prebuilt universal macOS package with out-of-the-box cross-compilation support for the other Apple targets), and then merge them via Apple's `lipo` tool: https://github.com/ldc-developers/ldc/blob/089b5820596c8a078f590b688375622c9fe8c8d5/.github/actions/merge-macos/action.yml#L35
Thank you!
Sep 03
parent Serg Gini <kornburn yandex.ru> writes:
On Thursday, 3 September 2026 at 12:59:30 UTC, Piotr Fusik wrote:
 targets), and then merge them via Apple's `lipo` tool: 
 https://github.com/ldc-developers/ldc/blob/089b5820596c8a078f590b688375622c9fe8c8d5/.github/actions/merge-macos/action.yml#L35
Thank you!
There was a nice talk about D code building for Steam. But Erik covered the macOS building process in a lot of details I recommend to check his talk and slides https://github.com/ericyoondotcom/dconf-2026-talk/blob/main/slides.pdf
Sep 07
prev sibling parent Guillaume Piolat <first.name gmail.com> writes:
On Thursday, 3 September 2026 at 08:18:13 UTC, Piotr Fusik wrote:
 Can LDC produce binaries for both Intel and Apple silicon CPUs?
Or you can use redub I think.
Sep 04