node/deps
Bert Belder ca8c9ec2c8 win,node-gyp: optionally allow node.exe/iojs.exe to be renamed
On Windows, when node or io.js attempts to dynamically load a compiled
addon, the compiled addon tries to load node.exe or iojs.exe again -
depending on which import library the module used when it was linked.
This causes many compiled addons to break when node.exe or iojs.exe are
renamed, because when the binary has been renamed the addon DLL can't
find the (right) .exe file to load its imports from.

This patch gives compiled addon developers an option to overcome this
restriction by compiling a delay-load hook into their binary. The
delay-load hook ensures that whenever a module tries to load imports
from node.exe/iojs.exe, it'll just look at the process image, thereby
making the addon work regardless of what name the node/iojs binary has.

To enable this feature, the addon developer must set the
'win_delay_load_hook' option to 'true' in their binding.gyp file, like
this:

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

Bug: https://github.com/iojs/io.js/issues/751
Bug: https://github.com/iojs/io.js/issues/965
Upstream PR: https://github.com/TooTallNate/node-gyp/pull/599

PR-URL: https://github.com/iojs/io.js/pull/1251
Reviewed-By: Rod Vagg <rod@vagg.org>

PR-URL: https://github.com/iojs/io.js/pull/1266
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-04-17 13:26:31 -07:00
..
cares src,deps: replace LoadLibrary by LoadLibraryW 2015-01-07 23:38:28 +01:00
gtest deps: check in gtest, add util unit test 2015-04-01 22:35:56 +02:00
http_parser deps: roll back http_parser to 2.3.0 2015-01-28 16:56:44 +01:00
npm win,node-gyp: optionally allow node.exe/iojs.exe to be renamed 2015-04-17 13:26:31 -07:00
openssl deps: add docs to upgrade openssl 2015-04-15 00:39:19 +09:00
uv linux: fix epoll_pwait() fallback on arm64 2015-04-07 16:30:09 +02:00
v8 deps: backport 1f8555 from v8's upstream 2015-04-11 21:06:40 +02:00
zlib deps: don't build minizip into zlib 2015-01-10 02:38:18 +01:00