-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Allow to explicitly define a build as (not) cross-compiled #10287
Conversation
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 fixes issue #10271
Could you add a Fixes: https://github.com/nodejs/node/issues/10271
line at the end of the commit message? :)
Done, thank you for the advice :-) |
New CI, just in case: https://ci.nodejs.org/job/node-test-pull-request/5555/ |
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.
LGTM but please format the commit log according to the style guide from CONTRIBUTING.md.
Commit log suggestion:
|
Adds --cross-compiling and --no-cross-compiling flags Fixes: nodejs#10271
Done, thanks for the suggestion :-) |
Landed in 8e60e0f |
Thank you :-) |
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
Build and compilation
Description of change
This fixes issue #10271, allowing to explicitly set that we are doing a cross-compilation (or not, if we desire so) instead of only rely on heuristics. This is useful when you are compiling to the same target CPU of your host system by using a toolchain that uses a different C lib (like musl from glib), since
mkpeephole
gets compiled with the cross-toolchain and later can't be executed. This way we can force it to use the host toolchain instead. By default it still use the heuristics.I have checked that it correctly set the GYP variables correctly and the compiled Node.js works as expected.