gyp: Enabling /ZW compile option#26
gyp: Enabling /ZW compile option#26munyirik wants to merge 1 commit intonodejs:chakracore-masterfrom munyirik:chakracore-master
Conversation
|
The dependency changes are normally sent to the upstream project and we pull from that. @nodejs/node-chakracore thoughts? |
|
Agreed. @munyirik , please refer to nodejs/node-gyp#873 (comment) |
|
|
|
In Nodejs core, we sometimes float a patch if it is absolutely necessary to move forward. If we start accepting dep changes then we may have to maintain them and deliver it to upstream. If upstream doesn't take it then we ll have a diverged project as a dependency and the complete maintenance will be on us. We wouldn't want to spend our energy this way, would we? :) |
|
Makes sense. I'll follow the instructions to get it in the gyp project. |
The change enables addons to compile with the /ZW (CompileAsWinRT) option when using node-gyp. e.g. if you have something like this in binding.gyp:
'targets': [
{
'target_name': 'foo',
'sources': [
'bar.cpp',
],
'msvs_settings': {
'VCCLCompilerTool': {
'CompileAsWinRT': 'true',
},
},
The change in MSVSSettings.py gets rid of the warning below:
Warning: unrecognized setting VCCLCompilerTool/CompileAsWinRT while converting to MSBuild.
The change in msvs.py gets rid of the error below:
TypeError: Appending "false" to a non-list setting "CompileAsWinRT" for tool "ClCompile" is not allowed, previous value: true