Skip to content

Commit

Permalink
build: add loader path to rpath for cctest
Browse files Browse the repository at this point in the history
Building on Mac OS/X as follows:

```
./configure --shared
make -j4 test
```

Results in:

```
dyld: Library not loaded: @rpath/libnode.67.dylib
  Referenced from: /Users/rubys/git/node-shared/out/Release/cctest
  Reason: image not found
make: *** [cctest] Abort trap: 6
```

This change adds the loader path to the runtime path for the `cctest` executable.

PR-URL: #23168
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
rubys authored and jasnell committed Oct 17, 2018
1 parent e4a1683 commit 4cfd569
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,11 @@
[ 'OS=="win" and node_shared=="true"', {
'type': 'none',
}],
[ 'node_shared=="true"', {
'xcode_settings': {
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
],
}, # cctest
], # end targets
Expand Down

0 comments on commit 4cfd569

Please sign in to comment.