diff --git a/binding.gyp b/binding.gyp index 1400bde..b39839a 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,4 +1,13 @@ { + # Node 26's common.gypi references variables like `enable_thin_lto` in + # `conditions`, but the bundled node-gyp (10.x) shipped with prebuild + # 13 doesn't inject defaults for them. On the Windows toolchain that + # results in `gyp: name 'enable_thin_lto' is not defined`. Providing a + # `%` default here is safe across all platforms and node-gyp versions: + # gyp only uses our default when the variable isn't already set. + 'variables': { + 'enable_thin_lto%': 'false', + }, 'targets': [ { 'target_name': 'node_expat', diff --git a/deps/libexpat/libexpat.gyp b/deps/libexpat/libexpat.gyp index d74e868..5bc4cb9 100644 --- a/deps/libexpat/libexpat.gyp +++ b/deps/libexpat/libexpat.gyp @@ -7,6 +7,12 @@ # ./out/Debug/test { + # Same Node 26 / node-gyp 10 workaround as in ../../binding.gyp. gyp loads + # dependency .gyp files in their own variable scope, so the default has to + # live here too — the parent binding.gyp's variables don't propagate down. + 'variables': { + 'enable_thin_lto%': 'false', + }, 'target_defaults': { 'default_configuration': 'Debug', 'configurations': {