Open
Bug 1490603
Opened 7 years ago
Updated 3 years ago
Make the linker remove code that's exported via FFI from gkrust but never called by the rest of libxul
Categories
(Firefox Build System :: Toolchains, enhancement)
Tracking
(Not tracked)
NEW
People
(Reporter: hsivonen, Unassigned)
References
Details
According to the thread at https://groups.google.com/forum/#!topic/mozilla.dev.platform/9WAMvihnx6I we don't yet have dead code removal for the case where gkrust exposes FFI functions that no one calls.
Having this dead code removal would be useful to enable importing C bindings for Rust crates in a "pay only for what you use" manner when we don't need to use the full C API but only a subset. (OTOH, it makes sense for a C binding on crates.io to be complete instead of an ad hoc subset that happens to match what Gecko happens to need at the moment.)
Comment 1•7 years ago
|
||
Per discussion in that thread it sounds like this needs Rust compiler changes to be actionable. We build our Rust code with LTO on most platforms, but rustc has no way to know that some exported symbols should not be kept.
Reporter | ||
Updated•5 years ago
|
See Also: → https://github.com/rust-lang/rust/issues/73958
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•