From 9572c260c83cf01dd835a32dee40a4f0b90cfdf9 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 21 Oct 2021 12:12:33 -0700 Subject: [PATCH] attempt to fix node less than 16 which contains older node-gyp before 0.6.0 release - refs nodejs/node-gyp#2233 --- test/app4/binding.gyp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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",