diff --git a/ext/napi/lib.rs b/ext/napi/lib.rs index 0d41bb40fe..20f924bdbf 100644 --- a/ext/napi/lib.rs +++ b/ext/napi/lib.rs @@ -662,7 +662,11 @@ pub fn print_linker_flags(name: &str) { symbols_path, ); - #[cfg(target_os = "linux")] + #[cfg(any( + target_os = "linux", + target_os = "freebsd", + target_os = "openbsd" + ))] println!( "cargo:rustc-link-arg-bin={name}=-Wl,--export-dynamic-symbol-list={}", symbols_path,