Skip to content

Commit a1c2891

Browse files
committed
fix(rust): Revert rustflags added in #14820
1 parent b4ebdf5 commit a1c2891

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.cargo/config.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,15 @@ rustflags = ["-C", "target-feature=+crt-static"]
2525
[target.aarch64-pc-windows-msvc]
2626
rustflags = ["-C", "target-feature=+crt-static"]
2727

28-
[target.'cfg(target_os = "linux")']
28+
# Fix NAPI bindings on Linux by preventing use of lld linker and allowing unresolved symbols
29+
# x86_64: Use linker-features flag to disable lld (stable on x86_64)
30+
[target.x86_64-unknown-linux-gnu]
2931
rustflags = ["-C", "linker-features=-lld", "-C", "link-args=-Wl,--warn-unresolved-symbols"]
3032

33+
# aarch64: linker-features is unstable, so skip it and only allow unresolved symbols
34+
[target.aarch64-unknown-linux-gnu]
35+
rustflags = ["-C", "link-args=-Wl,--warn-unresolved-symbols"]
36+
3137
# To be able to run unit tests on Windows, support compilation to 'x86_64-pc-windows-msvc'.
3238
# Use Hybrid CRT to reduce the size of the binary (Coming by default with Windows 10 and later versions).
3339
[target.'cfg(target_os = "windows")']

0 commit comments

Comments
 (0)