@@ -11,11 +11,6 @@ allocs = "run -p oxc_track_memory_allocations --profile coverage --"
1111rule = " run -p rulegen"
1212lintgen = " run -p oxc_linter_codegen"
1313
14- # Fix napi breaking in test environment <https://github.com/napi-rs/napi-rs/issues/1005#issuecomment-1011034770>
15- # To be able to run unit tests on macOS, support compilation to 'x86_64-apple-darwin'.
16- [target .'cfg(target_vendor = "apple")' ]
17- rustflags = [" -C" , " link-args=-Wl,-undefined,dynamic_lookup,-no_fixup_chains" ]
18-
1914[target .x86_64-pc-windows-msvc ]
2015rustflags = [" -C" , " target-feature=+crt-static" ]
2116
@@ -25,28 +20,18 @@ rustflags = ["-C", "target-feature=+crt-static"]
2520[target .aarch64-pc-windows-msvc ]
2621rustflags = [" -C" , " target-feature=+crt-static" ]
2722
28- # To be able to run unit tests on Windows, support compilation to 'x86_64-pc-windows-msvc'.
29- # Use Hybrid CRT to reduce the size of the binary (Coming by default with Windows 10 and later versions).
3023[target .'cfg(target_os = "windows")' ]
3124rustflags = [
32- " -C" ,
33- " link-args=/FORCE" ,
25+ # Disables linking against the default Universal C Runtime (libucrt.lib). This prevents conflicts if another CRT library is linked manually.
3426 " -C" ,
3527 " link-args=/NODEFAULTLIB:libucrt.lib" ,
28+ # Manually adds ucrt.lib (the Universal CRT) as a default library to link against, replacing the one you just excluded above.
29+ # This ensures consistent linking when multiple CRTs might be available.
3630 " -C" ,
3731 " link-args=/DEFAULTLIB:ucrt.lib" ,
3832]
3933
40- # Addresses a potential segmentation fault issue that occurs when
41- # running napi-rs within a Node.js worker thread on GNU/Linux systems.
42- # See https://x.com/Brooooook_lyn/status/1895848334692401270
43- [target .'cfg(target_env = "gnu")' ]
44- rustflags = [" -C" , " link-args=-Wl,-z,nodelete" ]
45-
46- [target .'cfg(target_os = "linux")' ]
47- rustflags = [" -C" , " link-args=-Wl,--warn-unresolved-symbols" ]
48-
4934# LLD linker is currently broken for us, opt out.
5035# https://blog.rust-lang.org/2025/09/18/Rust-1.90.0/#what-s-in-1-90-0-stable
5136[target .x86_64-unknown-linux-gnu ]
52- rustflags = [" -C" , " linker-features=-lld" , " -C " , " link-args=-Wl,--warn-unresolved-symbols " ]
37+ rustflags = [" -C" , " linker-features=-lld" ]
0 commit comments