-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Allow for cross-OS cross compiles, implement dest-cpu, dest-os options #2148
Conversation
For example, to cross-compile for Windows on Linux (other patches needed for this). Also pays respect to dest-cpu and dest-os options. Fixes nodejs#1736
Requires nodejs/node-v0.x-archive#2148 to set host_os
'darwin': 'mac', | ||
'sunos5': 'solaris', | ||
'freebsd7': 'freebsd', | ||
'freebsd7': 'freebsd', |
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.
Duplicate key. You should probably replace it with if os.startswith('freebsd'): return 'freebsd'
so it won't fail on freebsd 9 and 10 systems (same goes for linux 3.x).
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.
Fixed by commit adammw/node@7397992 .
Linux 3.x should have just been either linux2 or linux according to python docs as their phasing out version numbers, but this is now irrelevant as new commit uses startswith
for all (although the windows check may be a bit too permissive now I think about it).
Closing. The PR no longer applies and I'm not even sure if this is a feature we need. |
Yes I don't think this patch is relevant anymore in terms of the way to do it, however I'm still not sure that node can successfully be cross-compiled for Windows on a non-Windows (e.g. Linux) machine using the mingw compilers. Has this been tested to work or does an issue report already exist? |
No. But we (or rather, gyp) don't support mingw on Windows, let alone another OS. |
PR-URL: nodejs/node#5920 Refs: nodejs/node#2148 Reviewed-By: Brian White <mscdex@mscdex.net>
PR-URL: nodejs/node#5920 Refs: nodejs/node#2148 Reviewed-By: Brian White <mscdex@mscdex.net>
PR-URL: nodejs/node#5920 Refs: nodejs/node#2148 Reviewed-By: Brian White <mscdex@mscdex.net>
This is step 1 to cross-compile for Windows on Linux (other patches to uv.gyp and v8.gyp needed for this).
Also, I made it pay respect to dest-cpu and dest-os options.
Hopefully, fixes #1736 (not sure, looks to be only once) by setting
want_separate_host_toolset
variable.Not sure what to do with libz and some other tidbits, see TODOs in the code.