Skip to content

Commit 87d410d

Browse files
authored
Merge pull request #7 from PruvoNet/fix/gyp-enable-thin-lto
fix(gyp): default enable_thin_lto so Node 26 win32 configure works
2 parents fc240c4 + 48be8fb commit 87d410d

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

binding.gyp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2+
# Node 26's common.gypi references variables like `enable_thin_lto` in
3+
# `conditions`, but the bundled node-gyp (10.x) shipped with prebuild
4+
# 13 doesn't inject defaults for them. On the Windows toolchain that
5+
# results in `gyp: name 'enable_thin_lto' is not defined`. Providing a
6+
# `%` default here is safe across all platforms and node-gyp versions:
7+
# gyp only uses our default when the variable isn't already set.
8+
'variables': {
9+
'enable_thin_lto%': 'false',
10+
},
211
'targets': [
312
{
413
'target_name': 'node_expat',

deps/libexpat/libexpat.gyp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
# ./out/Debug/test
88

99
{
10+
# Same Node 26 / node-gyp 10 workaround as in ../../binding.gyp. gyp loads
11+
# dependency .gyp files in their own variable scope, so the default has to
12+
# live here too — the parent binding.gyp's variables don't propagate down.
13+
'variables': {
14+
'enable_thin_lto%': 'false',
15+
},
1016
'target_defaults': {
1117
'default_configuration': 'Debug',
1218
'configurations': {

0 commit comments

Comments
 (0)