Skip to content

Commit 49b0ec4

Browse files
rubystargos
authored andcommitted
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: #23168 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent ed01b38 commit 49b0ec4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

node.gyp

+5
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,11 @@
959959
[ 'OS=="win" and node_shared=="true"', {
960960
'type': 'none',
961961
}],
962+
[ 'node_shared=="true"', {
963+
'xcode_settings': {
964+
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
965+
},
966+
}],
962967
],
963968
}, # cctest
964969
], # end targets

0 commit comments

Comments
 (0)