From 66e366518d4836baabcf7562b649fa37085105c5 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Fri, 1 Nov 2024 12:30:00 +0100 Subject: [PATCH] Don't pass -lc to Emscripten, it breaks See: https://github.com/emscripten-core/emscripten/issues/22742 https://github.com/emscripten-core/emscripten/issues/16680 https://github.com/rust-lang/rust/issues/98155 https://github.com/rust-lang/rust/pull/98303 https://github.com/rust-lang/rust/pull/131885 --- src/unix/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/mod.rs b/src/unix/mod.rs index d53a382a01ae4..e8fa1cf9c7be3 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -389,8 +389,8 @@ cfg_if! { link(name = "c", cfg(not(target_feature = "crt-static"))))] extern {} } else if #[cfg(target_os = "emscripten")] { - #[link(name = "c")] - extern {} + // Don't pass -lc to Emscripten, it breaks. See: + // https://github.com/emscripten-core/emscripten/issues/22758 } else if #[cfg(all(target_os = "android", feature = "rustc-dep-of-std"))] { #[link(name = "c", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]