Skip to content

Commit 67b78d4

Browse files
compiler,rust: No native-static-libs for wasm after 1.84
Rust 1.84 uses the latest emsdk 3.1.68 [1], and it fixed an issue with Emscripten dynamic linking and libc [2]. After that no native-static-libs in the output if running: ``` rustc --target=wasm32-unknown-emscripten --crate-type staticlib --print native-static-libs - < /dev/null ``` [1] rust-lang/rust#131533 [2] rust-lang/libc#4002
1 parent 7a43b6e commit 67b78d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mesonbuild/compilers/rust.py

+3
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ def _native_static_libs(self, work_dir: str, source_name: str) -> None:
165165
# no match and kernel == none (i.e. baremetal) is a valid use case.
166166
# return and let native_static_libs list empty
167167
return
168+
if self.info.system == 'emscripten':
169+
# no match and emscripten is valid after rustc 1.84
170+
return
168171
raise EnvironmentException('Failed to find native-static-libs in Rust compiler output.')
169172
# Exclude some well known libraries that we don't need because they
170173
# are always part of C/C++ linkers. Rustc probably should not print

0 commit comments

Comments
 (0)