summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/rust.py
diff options
context:
space:
mode:
authorRuben Gonzalez <rgonzalez@fluendo.com>2024-12-31 15:02:50 +0100
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-08-10 20:33:51 +0300
commit7d44982b32974059f5c3e0b6a7dfc7838e295390 (patch)
treeb052368a35267ad19daac7da3b52f4e4d08ca783 /mesonbuild/compilers/rust.py
parent4b33c9cdb64f360c2ee19691baedfa4d0e32378f (diff)
downloadmeson-7d44982b32974059f5c3e0b6a7dfc7838e295390.tar.gz
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] https://github.com/rust-lang/rust/pull/131533 [2] https://github.com/rust-lang/libc/pull/4002
Diffstat (limited to 'mesonbuild/compilers/rust.py')
-rw-r--r--mesonbuild/compilers/rust.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py
index bc2777990..d0f92668a 100644
--- a/mesonbuild/compilers/rust.py
+++ b/mesonbuild/compilers/rust.py
@@ -155,6 +155,9 @@ class RustCompiler(Compiler):
# no match and kernel == none (i.e. baremetal) is a valid use case.
# return and let native_static_libs list empty
return
+ if self.info.system == 'emscripten':
+ # no match and emscripten is valid after rustc 1.84
+ return
raise EnvironmentException('Failed to find native-static-libs in Rust compiler output.')
# Exclude some well known libraries that we don't need because they
# are always part of C/C++ linkers. Rustc probably should not print