From 04466f9ffc955cb42975a97d9388d12ee813675e Mon Sep 17 00:00:00 2001 From: Aman Karmani Date: Tue, 22 Jul 2025 00:02:52 -0700 Subject: [PATCH] Normalize linker args The `libraries` entry is meant to contain linker args prefixed with `-l`. See i.e. https://github.com/nodejs/node-gyp/blob/0e656322c1e94041331ab3b01bf66c2ef9bd6ead/addon.gypi#L170-L182 I ran into this experimenting with Makefile backend for gyp in a cross-compiler env. --- binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index c740046..ffc0fbc 100644 --- a/binding.gyp +++ b/binding.gyp @@ -15,7 +15,7 @@ "src/process_commandline.cc" ], "include_dirs": [], - "libraries": [ 'psapi.lib' ], + "libraries": [ '-lpsapi.lib' ], "msvs_configuration_attributes": { "SpectreMitigation": "Spectre" },