Node-gyp: npm-gyp on Windows should allow build tools to be configured to use gcc

Created on 17 Feb 2014  路  6Comments  路  Source: nodejs/node-gyp

Whenever feasible, I refuse to use MS compilers. Having npm-gyp use the same compiler on all platforms seems easier to maintain anyway.

Most helpful comment

@stupid-genius The offical node.exe binary is compiled with MSVS, and therefore any binary addons that get compiled for it must also be compiled via MSVS. We can't mix and match the compilers when they are meant to be interacting with each other via dlopen() (well, the Windows equivalent of that).

All 6 comments

Please go talk to the Gyp team. node-gyp is a wrapper API around the python Gyp library. The change to use GCC on Windows would have to be made at the Gyp level.

You can file an issue on Gyp here:

https://code.google.com/p/gyp/issues/list

Thanks. In that case, is it possible to configure npm to use something other than npm-gyp? (read: configure--not re-write) Could someone potentially write an npm-gcc module to use with npm?

Best direction I could put you on would be to investigate converting gyp project configuration files into cmake project configuration files and going from there. CMake is an alternative to gyp and I believe it supports gcc on windows.

@stupid-genius The offical node.exe binary is compiled with MSVS, and therefore any binary addons that get compiled for it must also be compiled via MSVS. We can't mix and match the compilers when they are meant to be interacting with each other via dlopen() (well, the Windows equivalent of that).

Well, that sucks, but thanks for the answers.

I've just posted this request to the Google GYP team ...

https://code.google.com/p/gyp/issues/detail?id=448

Was this page helpful?
0 / 5 - 0 ratings