-
Notifications
You must be signed in to change notification settings - Fork 73
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
Use arch instead of target_arch #311
Conversation
Thanks for the PR. There's some logic in https://github.com/nodejs/node-gyp/blob/b3d41aeb737ddd54cc292f363abc561dcc0a614e/lib/build.js#L59 There's also a known bug in |
I think it still would be necessary. The documentation is also suggesting using --arch: https://github.com/nodejs/node-gyp/tree/b3d41aeb737ddd54cc292f363abc561dcc0a614e#command-options This was probably not the case before, but since updating prebuild to version 12, even though target_arch is set to x64, the flags passed to the compiler state that the build arch should be arm64. With this change it works as expected without any side effects. |
See also prebuild/prebuildify#53 and prebuild/prebuildify#52 (comment) |
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.
Please can you update the failing "gyp is invoked with correct arguments" tests.
I've made the changes, the tests are passing now. |
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.
Thank you, LGTM
When building for a different architecture using node-gyp, the arch option should be used. Using target_arch populates the variable usable in the binding.gyp file, but node-gyp will still do a build with the system's architecture.