Page MenuHomePhabricator

libunwind: fix building on mingw-w64
AbandonedPublic

Authored by martell on May 26 2017, 11:32 AM.

Details

Summary

This needs to be updated to actually handle dwarf unwind tables for mingw-w64.
Getting this initial diff onto phab so we can have a discussion about it.
This should build for mingw-w64 even if it is not useful.

Diff Detail

Repository
rL LLVM

Event Timeline

martell created this revision.May 26 2017, 11:32 AM
EricWF added inline comments.May 31 2017, 3:49 PM
src/assembly.h
30

This seems like it's obviously not correct. What is going on with this?

src/config.h
41

Why are these commented out?

55

Shouldn't this be change to be a DLL import/export?

compnerd requested changes to this revision.May 31 2017, 9:17 PM

Im not sure that this is a reasonable patch. I think that specializing a AddressSpace for _WIN32 is more likely what we want. Furthermore, this actually should be more restrictive, since the unwind library cannot be used for Windows -- the unwinding model on Windows is completely different. This only makes sense for MinGW and cygwin, and so we should ensure that the environment matches that.

src/AddressSpace.hpp
293

Huh? This doesn't make sense. mach_header_64 on _WIN64? Plus, how does dladdr work here?

src/config.h
54

Please use defined.

55

This should be using __declspec(dllexport) and .

This revision now requires changes to proceed.May 31 2017, 9:17 PM
mati865 added a subscriber: mati865.Sep 9 2017, 2:24 AM
mati865 added inline comments.
src/AddressSpace.hpp
293

It's guarded by __APPLE__ and probably was added by mistake when modifying __LP64__ checks.

mstorsjo edited edge metadata.Oct 4 2017, 1:13 AM

@martell I think this patch can be discarded now. The CMake parts for mingw libs have been committed, and libunwind works for SjLj exceptions on mingw on x86, x86_64 and armv7 now (although only for static builds).

martell abandoned this revision.Oct 15 2017, 10:16 AM

This and a lot more has been handled by martin in other patches.
Closing/Abandoning