Use -nostdlibinc for wasm32-wasi like wasm32-unknown-unknown.

This commit is contained in:
Brian Smith 2023-10-14 13:49:09 -07:00
parent 8348897d92
commit 2986d15484

View File

@ -619,7 +619,7 @@ fn configure_cc(c: &mut cc::Build, target: &Target, include_dir: &Path) {
// Allow cross-compiling without a target sysroot for these targets.
//
// poly1305_vec.c requires <emmintrin.h> which requires <stdlib.h>.
if (target.arch == "wasm32" && target.os == "unknown")
if (target.arch == "wasm32")
|| (target.os == "linux" && target.is_musl && target.arch != "x86_64")
{
if let Ok(compiler) = c.try_get_compiler() {