This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 200
Allow cross compiling #150
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This should link out to more information. What is CC, CC_host? Where can I learn more?
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.
Unfortunately there is no documentation there. Even Node.js does not provide one on the topic of cross-compilation.
CC is "C Compiler".
CC_host is "C Compiler for the host".
Users are kinda expected to know this, if they wish to take advantage of this more advanced option. Of course, I am always open to better docs, but I don't think I can do a "cross compile 101" here.
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.
maybe instead of making it working by default and show a warning would be better to force the flag to be there, if it is not there throw like it was before
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 would fail (very soon). So there is no need for that. That would also drastically increase the complexity of matrix-based CI workflows, as we probably don't want the flag when compile natively.
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.
ok LGTM for me so
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.
Let's add the documentation to the README then, and then link to the readme in the error message?
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.
and, FYI: upstream (Node.js) builds and tests natively. See https://github.com/nodejs/build . They have native machines donated by IBM, ARM, etc. That explains why there is very little documentation on cross compilation.
There is no guaranteed good documentation here. Cross compilation is quite complicated. For instance, GCC vs LLVM: GCC uses separate binaries but LLVM uses
--target=<triple>
and other flags. And, the instructions for how to install a cross toolchain obviously vary a lot between distros.I think it would be challenging to add any documentation, and we should probably follow the example of upstream, and ask advanced users to explore the codes, workflows and Google for answers instead.