Skip to content

Commit

Permalink
fixup: move CFLAGS to Node.js patch since CFLAGS does not work on Win…
Browse files Browse the repository at this point in the history
…dows
  • Loading branch information
addaleax committed Mar 27, 2024
1 parent 13bbbd0 commit da16279
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/build/src/compile/signable-compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,6 @@ export class SignableCompiler {
...(process.platform === 'linux' && {
GYP_DEFINES: 'kerberos_use_rtld=true',
}),
// Work around https://github.com/nodejs/node/issues/52229
CFLAGS: [
process.env.CFLAGS,
'-DNODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT=1 -DNAPI_EXPERIMENTAL=1',
].join(' '),
CXXFLAGS: [
process.env.CXXFLAGS,
'-DNODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT=1 -DNAPI_EXPERIMENTAL=1',
].join(' '),
},
addons: [fleAddon, osDnsAddon, kerberosAddon, cryptLibraryVersionAddon]
.concat(winCAAddon ? [winCAAddon] : [])
Expand Down
14 changes: 14 additions & 0 deletions scripts/nodejs-patches/002-workaround-node-bug-52229
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/common.gypi b/common.gypi
index efcd8da84815..fe11453f09b5 100644
--- a/common.gypi
+++ b/common.gypi
@@ -268,6 +268,9 @@
# Defines these mostly for node-gyp to pickup.
'defines': [
'_GLIBCXX_USE_CXX11_ABI=1',
+ # Work around https://github.com/nodejs/node/issues/52229
+ "NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT=1",
+ "NAPI_EXPERIMENTAL=1",
],

# Forcibly disable -Werror. We support a wide range of compilers, it's

0 comments on commit da16279

Please sign in to comment.