-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support compiling on msys2/ucrt64 (no exception handling) #254
Conversation
a0f685d
to
28836e4
Compare
objc_msgSend.x86-32.S
Outdated
.ascii " /EXPORT:_objc_msgSend" | ||
.ascii " /EXPORT:_objc_msgSend_stret" | ||
.ascii " /EXPORT:_objc_msgSend_fpret" | ||
#else | ||
.ascii " /EXPORT:objc_msgSend" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the CDECL macro defined in common.S to avoid duplication of directives. You might need to change the ifdefs tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 1 to 5 in 8e18060
#if ((defined(_WIN32) || defined(__CYGWIN__)) && defined(__i386__)) || defined(__APPLE__) | |
#define CDECL(symbol) _##symbol | |
#else | |
#define CDECL(symbol) symbol | |
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure about using the existing macros, but I added a new macro to common.S
which simplified things. Thanks!
@@ -37,7 +37,7 @@ | |||
test %eax, %eax | |||
jz 5f # Nil slot - invoke some kind of forwarding mechanism | |||
mov SLOT_OFFSET(%eax), %ecx | |||
#ifdef _WIN32 | |||
#ifdef _MSC_VER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does MSYS not support CFG?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this recently landed: https://sourceforge.net/p/mingw-w64/mailman/message/37712869/, I’ll have a closer look later today/tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mingw does support CFG, I've reverted this change.
Looks good to me. Please can you rebase and squash? |
bf93f18
to
ec3640e
Compare
Thanks, @davidchisnall . I rebased and squashed the commits. Looks like the FreeBSD build failures on this PR and #255 are unrelated:
|
ec3640e
to
595d114
Compare
Rebased on master |
This contains a minimal set of changes from #190 to get libobjc2 to compile under msys2/ucrt64. Exception handling is broken, but it at least allows for some kind of testing with libobjc2 on that environment.
I had to configure the project with
CC=clang CXX=clang LDFLAGS="-fuse-ld=lld -lstdc++ -lgcc_s" cmake .. -DTESTS=ON
.79% tests passed, 40 tests failed out of 194.
I hope these changes are non-controversial and getting them merged into master prevent them from bit rotting on a branch (like #190) - further work could come as smaller, follow-up PRs.
Any objections?