DUB on Apple Silicon
Johan
j at j.nl
Mon Oct 30 22:06:11 UTC 2023
On Monday, 30 October 2023 at 21:29:50 UTC, Jan Allersma wrote:
> On Monday, 30 October 2023 at 21:06:34 UTC, Richard (Rikki)
> Andrew Cattermole wrote:
>> See:
>> https://github.com/dlang/dub/blob/master/source/dub/compilers/ldc.d#L93
>>
>> Use aarch64 instead.
>
> Thanks! It seems to partially solve the problem. When building,
> the linker still expects x86_64 architecture instead of arm64:
Hello Jan,
I don't know much about compiling with `dub`. But I think that
the program invoking the linker defines the mode of the linker;
looks like the linker is called from an x86_64 binary, instead of
an arm64.
Can you tell us (use `file ...` to check):
1. Is `ldc2` an arm64 binary or an x86_64 binary?
2. is `dub` arm64?
I think in an ideal world you don't even have to tell `dub` what
arch to build for, it automatically selects the right
architecture.
If you use the LDC released binaries for macOS from LDC's github,
you will get arm64 versions of `ldc2`, `dub`, ...
https://github.com/ldc-developers/ldc/releases/download/v1.35.0/ldc2-1.35.0-osx-arm64.tar.xz
cheers,
Johan
More information about the digitalmars-d-ldc
mailing list