From 5e90301bd9d4bf651492c9035417dc3b1cb7d58f Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Sat, 29 Sep 2018 16:43:39 -0400 Subject: [PATCH] build: add loader path to rpath for cctest 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. --- node.gyp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node.gyp b/node.gyp index e1adf8cd12e30b..285eed7b406a41 100644 --- a/node.gyp +++ b/node.gyp @@ -956,6 +956,11 @@ [ 'OS=="win" and node_shared=="true"', { 'type': 'none', }], + [ 'node_shared=="true"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ], + }, + }], ], } ], # end targets