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

Built yosys.wasm is too large #4822

Open
LSTM-Kirigaya opened this issue Dec 18, 2024 · 1 comment
Open

Built yosys.wasm is too large #4822

LSTM-Kirigaya opened this issue Dec 18, 2024 · 1 comment
Labels
pending-verification This issue is pending verification and/or reproduction

Comments

@LSTM-Kirigaya
Copy link

Version

Yosys 0.48+5 (git sha1 7a362f1, clang++ 18.1.2-wasi-sdk -Oz)

On which OS did this happen?

Linux, WebAssembly

Reproduction Steps

Disable all the features in Makefile

# features (the more the better)
ENABLE_TCL := 0
ENABLE_ABC := 0
ENABLE_GLOB := 0
ENABLE_PLUGINS := 0
ENABLE_READLINE := 0
ENABLE_EDITLINE := 0
ENABLE_GHDL := 0
ENABLE_VERIFIC := 0
ENABLE_VERIFIC_SYSTEMVERILOG := 0
ENABLE_VERIFIC_VHDL := 0
ENABLE_VERIFIC_HIER_TREE := 0
ENABLE_VERIFIC_YOSYSHQ_EXTENSIONS := 0
ENABLE_VERIFIC_EDIF := 0
ENABLE_VERIFIC_LIBERTY := 0
ENABLE_COVER := 0
ENABLE_LIBYOSYS := 0
ENABLE_ZLIB := 0

...

# Needed for environments that can't run executables (i.e. emscripten, wasm)
DISABLE_SPAWN := 1
# Needed for environments that don't have proper thread support (i.e. emscripten, wasm--for now)
DISABLE_ABC_THREADS := 1

then run

make config-wasi
make -j 48
du yosys.wasm -h

output:

242M    yosys.wasm

The build wasm is too large (previous version of emcc build wasm is only 12MB)

btw, wasi sdk is wasi-sdk-24.0-x86_64-linux

Expected Behavior

Expect generated yosys.wasm with size of <20MB

Actual Behavior

Generated yosys.wasm with size of 242MB

@LSTM-Kirigaya LSTM-Kirigaya added the pending-verification This issue is pending verification and/or reproduction label Dec 18, 2024
@whitequark
Copy link
Member

Do you happen to build with debug information? If you post the output of objdump -h that would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-verification This issue is pending verification and/or reproduction
Projects
None yet
Development

No branches or pull requests

2 participants