win,node-gyp: make delay-load hook optional
authorBert Belder <bertbelder@gmail.com>
Thu, 26 Mar 2015 03:53:35 +0000 (20:53 -0700)
committerBert Belder <bertbelder@gmail.com>
Thu, 26 Mar 2015 20:32:06 +0000 (13:32 -0700)
commit08acf1352c48aa867ed304db2ca088b2c95e40a4
treec1f51c3ac7e00ef9a56dab352e9e53cf7c23a5b4
parent776b73b24306bac0ce299df4f90b7645d5efca31
win,node-gyp: make delay-load hook optional

The delay-load hook that was landed in 3d46fef to make compiled addons
work on Windows regardless of the iojs.exe/node.exe filename causes
issues with a small amount of compiled addons.

Therefore this patch makes it an opt-in feature. An addon may set the
'win_delay_load_hook' option to 'true' in its binding.gyp to enable this
feature.

Example:

```
{
  'targets': [
    {
      'target_name': 'ernie',
      'win_delay_load_hook': 'true',
      ...
```

Refs: https://github.com/iojs/io.js/pull/1251
PR-URL: https://github.com/iojs/io.js/pull/1266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
deps/npm/node_modules/node-gyp/addon.gypi