and3rson / foreigner

FFI library for Godot, built with GDNative
MIT License
25 stars 4 forks source link

Add build win64 on linux cross compile support + more #12

Open follower opened 4 years ago

follower commented 4 years ago

Adds Windows cross-compiling on Linux support to my earlier Mac build PR (although I still need to verify I didn't break anything in that :) ), also:

I've checked the resulting .dll works both on Wine64 & an actual Windows 10 Home machine.

I haven't tested non-cross-compilation building on Windows.

(Oh, yeah, just remembered, make all may not work at the moment--I just always use the test target.)

I've tried to document as much as I can, because figuring out the approach for libffi in particular took a bunch of research. I've got some more related notes which I may or may not get around to adding. :)

Anyway, it seems to work sufficiently for my purposes currently so I thought I'd at least submit as a draft PR so you know it'd been done. :)

follower commented 4 years ago

Quick update: The -Wl,-static flag seems to make the Mac build unhappy (in relation to C++/System libraries) so I might change it to make just libffi statically linked.