TL;DR this commit broke compilation of nodejs-mobile for iOS from an x64 macBook. See PR nodejs-mobile/nodejs-mobile#9
(I'm not sure if it's good practice to comment on old PRs, so feel free to tell me to move this discussion elsewhere.)
I maintain nodejs-mobile lately, and I'm updating our fork from Node 12.x to Node 16.x. Since we're compiling node.js for iOS, we want the arch to be arm64, but the host clang has flags like __amd64__ and this mixed with the iPhoneOS SDK headers ends up causing an Unsupported architecture compilation error.
Maybe a solution would be to patch this gyp-next script to detect whether we're running in arm64 darwin (such checks are common throughout the codebase, I've noticed) and then use the new logic. Else, use the old logic.
What do you think?
Originally posted by @staltz in #78 (comment)
TL;DR this commit broke compilation of nodejs-mobile for iOS from an x64 macBook. See PR nodejs-mobile/nodejs-mobile#9
(I'm not sure if it's good practice to comment on old PRs, so feel free to tell me to move this discussion elsewhere.)
I maintain nodejs-mobile lately, and I'm updating our fork from Node 12.x to Node 16.x. Since we're compiling node.js for iOS, we want the
archto bearm64, but the host clang has flags like__amd64__and this mixed with the iPhoneOS SDK headers ends up causing anUnsupported architecturecompilation error.Maybe a solution would be to patch this gyp-next script to detect whether we're running in arm64 darwin (such checks are common throughout the codebase, I've noticed) and then use the new logic. Else, use the old logic.
What do you think?
Originally posted by @staltz in #78 (comment)