fix(napi): segfault when running napi-rs within a Node.js worker thread on gnu linux

closes #9054
This commit is contained in:
Boshen committed 2025-03-02 10:33:13 +08:00
1 parent 2a08b144de
commit a08ede79aa
1 file changed
+6
+6
View File
@@ -36,3 +36,9 @@ rustflags = [
"-C",
"link-args=/DEFAULTLIB:ucrt.lib",
]
# Addresses a potential segmentation fault issue that occurs when
# running napi-rs within a Node.js worker thread on GNU/Linux systems.
# See https://x.com/Brooooook_lyn/status/1895848334692401270
[target.'cfg(target_env = "gnu")']
rustflags = ["-C", "link-args=-Wl,-z,nodelete"]