-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
compiler,rust: No native-static-libs for wasm after 1.84 #14060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
compiler,rust: No native-static-libs for wasm after 1.84 #14060
Conversation
@@ -161,6 +161,9 @@ def _native_static_libs(self, work_dir: str, source_name: str) -> None: | |||
# 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's expected to always not match, should we skip running rustc --crate-type staticlib --print .......
entirely, and simply return early from the function depending on self.version
comparison?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mimicked the baremetal flow where not early-return. I understood that running "rustc" was interesting to check it the compiler can compile staticlib.
However, the decision is yours. Please let me know your preference, and I would be happy to assist with the early return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @eli-schwartz
This PR cannot be backported (?) to the stable release as it has not been merged to master (!!) -- unsetting from the milestone... |
@rgonzalezfluendo can you rebase to fix CI? |
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
c2fe669
to
67b78d4
Compare
It didn't fix CI but the failures are independent. |
@bonzini: is this ready for merge? It's a pretty small bug fix so should be suitable for merge during the release period |
Yes, I think everything in the milestone should be suitable... Only @eli-schwartz had some cosmetic comments. |
I am working on adding support to gst-plugins-rs to
gst.wasm
.gst.wasm
is a GStreamer port to WebAssembly where meson works correctly for all C/C++ projects. The last release of Rust, version 1.84, unblocks an issue with that language. Rust 1.84 uses the latest emsdk 3.1.68. Among many other things, it fixed an issue with Emscripten dynamic linking and libc. After that, nonative-static-libs
in the output if running:Note: