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

Cache not working #314

Closed
vshymanskyy opened this issue May 6, 2021 · 2 comments
Closed

Cache not working #314

vshymanskyy opened this issue May 6, 2021 · 2 comments

Comments

@vshymanskyy
Copy link

vshymanskyy commented May 6, 2021

System: Ubuntu 21.04 x64
WAVM: https://github.com/WAVM/WAVM/releases/tag/nightly%2F2021-04-03

Steps:

git clone https://github.com/wasm3/wasm3-self-compiling.git

cd wasm3-self-compiling

wavm run --mount-root . ./wasm/clang.wasm  -cc1 -triple wasm32-unknown-wasi -isysroot /sys -internal-isystem /sys/include -emit-obj -o source/hello/hello.o source/hello/hello.c -O3

wavm run --mount-root . ./wasm/wasm-ld.wasm  -L/sys/lib/wasm32-wasi /sys/lib/wasm32-wasi/crt1.o -lc -o hello.wasm source/hello/hello.o -O3 -s

First command takes ~5 minutes, second ~3 minutes, every time the command is executed.
After commands start executing, they fail due to this issue, but it's unrelated.

Expected result: first time the module takes long time to compile, consequent runs should be much faster.

@AndrewScheidecker
Copy link
Member

Do you have the WAVM_OBJECT_CACHE_DIR environment variable set? See https://github.com/WAVM/WAVM/blob/master/Doc/GettingStarted.md#set-up-an-object-cache

It doesn't use a cache unless you manually set that environment variable to point to some directory.

@vshymanskyy
Copy link
Author

My bad, WAVM_OBJECT_CACHE_DIR was not exported 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants