fix #23524 - Cross-compiling to macos crashes on Windows - #23525
Conversation
| @@ -1,4 +1,5 @@ | |||
| // EXTRA_OBJC_SOURCES: | |||
| // also check cross compilation | |||
| // REQUIRED_ARGS: -os=osx | |||
There was a problem hiding this comment.
| // REQUIRED_ARGS: -os=osx | |
| // REQUIRED_ARGS: -target=x86_64-apple-darwin |
This should fix the problems on 32-bit (i686 macOS not supported anymore), and also hopefully avoids problems for LDC (no -os support for ldmd2, only -target). DMD doesn't seem to support macos as OS, only osx (non-standard AFAIK) and darwin.
There was a problem hiding this comment.
Oh well, on the other hand LDC would only be testing this for that one target, incl. when running on macOS arm64 natively, so that's not ideal. So maybe PERMUTE_ARGS?
There was a problem hiding this comment.
I used -target=x86_64-darwin at first, but that conflicts with -m32 that is added to the command line.
There was a problem hiding this comment.
Ouch, that additional annoyance...
There was a problem hiding this comment.
Overwriting -m32 with a required -m64 seems to work
There was a problem hiding this comment.
Fine by me, I'll remove these REQUIRED_ARGS then for LDC, no point in using it as cross-compile smoke test there.
| version (Windows) | ||
| { | ||
| import dmd.backend.mscoffobj; | ||
| objmod = MsCoffObj_init(&objbuf, srcfile, null); |
There was a problem hiding this comment.
Hmm, this seems to be the only call of that function?
There was a problem hiding this comment.
The call is hidden in the mixin at
dmd/compiler/src/dmd/backend/obj.d
Line 69 in a24d705
missing call of MachObj_init
missing call of MachObj_init
Not urgent, but also low risk for stable.