Skip to content

Commit c2fe669

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 3b36cb2 commit c2fe669

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mesonbuild/compilers/rust.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ def _native_static_libs(self, work_dir: str, source_name: str) -> None:
161161
# no match and kernel == none (i.e. baremetal) is a valid use case.
162162
# return and let native_static_libs list empty
163163
return
164+
if self.info.system == 'emscripten':
165+
# no match and emscripten is valid after rustc 1.84
166+
return
164167
raise EnvironmentException('Failed to find native-static-libs in Rust compiler output.')
165168
# Exclude some well known libraries that we don't need because they
166169
# are always part of C/C++ linkers. Rustc probably should not print

0 commit comments

Comments
 (0)