Skip to content
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

Strip shared libraries? #222

Open
webmaster128 opened this issue Jun 22, 2021 · 3 comments
Open

Strip shared libraries? #222

webmaster128 opened this issue Jun 22, 2021 · 3 comments
Labels

Comments

@webmaster128
Copy link
Member

Stripping is currently disabled. We could (should?) re-enable it. It must be performed in the guest (the builder) in order to support stripping for multiple systems.

@ethanfrey ethanfrey added this to the 1.0 milestone Jun 22, 2021
@ethanfrey
Copy link
Member

It was disabled to allow easier debugging if we hit a crash in Rust, which had happened before due to some race conditions.

Once we hit 1.0, we could strip again, and only make custom builds if we need to debug something.

@webmaster128
Copy link
Member Author

Is there any value in having a small binary for the shared library? One could argue the symbols do not hurt and may help debug exotic crashed on live chains.

If we want to enable stripping, I suggest letting Rust do it directly. There are two ways:

  1. Current workaround: RUSTFLAGS='-C link-arg=-s' cargo build --release
  2. The almost stable cargo configuration: Tracking issue for -Z strip=val option rust-lang/rust#72110

For now, I'll remove all reference to extra OS specific strip tools.

@ethanfrey
Copy link
Member

5MB off of a 50-60MB wasmd binary is not a major issue IMO.

We could see what the size difference is with the stripped/unstripped DLLs. And then the current size of wasmd and guess what this will effect. But I don't see too much need to optimize for binary size.

@webmaster128 webmaster128 removed this from the 1.0 milestone Jul 15, 2021
@webmaster128 webmaster128 changed the title Strip shared libraries Strip shared libraries? Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants