diff --git a/test/app4/binding.gyp b/test/app4/binding.gyp index 10e05eb9..12eeb952 100644 --- a/test/app4/binding.gyp +++ b/test/app4/binding.gyp @@ -15,7 +15,13 @@ }, 'msvs_settings': { 'VCCLCompilerTool': { 'ExceptionHandling': 1 }, - } + }, + # gyp inside node v16 uses -rpath=$ORIGIN/ instead of -rpath=$ORIGIN/lib.target/ + # which fixes a longstanding descreptancy between platforms as documented at https://github.com/nodejs/node-gyp/issues/2233 + # This allows tests to pass for older, still buggy and inconsistent versions of node-gyp (and will be duplicative for npm >= 7 which bundles node-gyp >= v0.6.0) + 'ldflags': [ + "-Wl,-rpath=\$$ORIGIN/" + ], }, { "target_name": "action_after_build",