0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/deps
Bert Belder efadffe861 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-03 17:11:21 -07:00
..
cares
gtest deps: check in gtest, add util unit test 2015-04-01 22:35:56 +02:00
http_parser
npm win,node-gyp: optionally allow node.exe/iojs.exe to be renamed 2015-04-03 17:11:21 -07:00
openssl deps: upgrade to openssl-1.0.1m 2015-03-19 10:08:13 -07:00
uv deps: update libuv to 1.4.2 2015-02-26 14:24:58 +01:00
v8 v8: back-port openbsd/amd64 build fix 2015-04-02 00:28:25 +02:00
zlib