From 6696354dbad41157a97ee4b5e258c0dd13cdf23a 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. PR-URL: https://github.com/nodejs/node/pull/23168 Reviewed-By: Richard Lau Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- node.gyp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/node.gyp b/node.gyp index 38c0a73c51e145..67a0c5b95421ad 100644 --- a/node.gyp +++ b/node.gyp @@ -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