setup-dlang
setup-dlang copied to clipboard
Apple Silicon support
The macos-latest runner at GitHub is now an arm64 machine. It looks like this action (or DMD?) does not support it:
Error: The dmd compiler is not supported for non-x64 architecture
at run (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/webpack:/setup-dlang/src/main.ts:35:1)
at Object.399 (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/webpack:/setup-dlang/src/main.ts:109:1)
at exports (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/webpack:/setup-dlang/webpack/bootstrap:14:1)
at __webpack_require__ (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/webpack:/setup-dlang/webpack/runtime/compat:2:1)
at Object.<anonymous> (/Users/runner/work/_actions/dlang-community/setup-dlang/v1/webpack:/setup-dlang/webpack/startup:4:1)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Function.Module._load (node:internal/modules/cjs/loader:93[8](https://github.com/neilsf/xc-basic3/actions/runs/9084783366/job/24966555812#step:3:9):12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
````
Any chance to make this run on Apple Silicon runners?
Thanks
DMD is unsupported on arm, on ARM your only compiler choices are LDC and GDC (and on mac really only LDC)
We should at least make the default on arm be LDC.
the default should be ldc if not set and not x86, but I'll make a PR to add an explicit auto value and also make it work in case the yml file does funny things
Since there is the transparent Rosetta translation layer, shouldn't DMD generally work just fine? It won't output native ARM executables, of course, but that may not be necessary anyway.
Since there is the transparent Rosetta translation layer, shouldn't DMD generally work just fine? It won't output native ARM executables, of course, but that may not be necessary anyway.
It looks like install.sh allows dmd to be installed on arm64 macs so I see no reason why the action should hard fail on macos-latest: https://github.com/dlang/installer/blob/5c1e63782abc145e8b63a1e3a60c8ca3cff19885/script/install.sh#L1324-L1330
I'll go and remove the checks and everything should just work.
The action also (tries to) default to ldc-latest on non-x86 and dmd-latest on x86. I think it's fine to leave this as is even if dmd would work on arm64 macs.