Closed phoenix20162016 closed 3 months ago
To build for wasm64 you can add -sMEMORY64
to you compile and link commands.
@sbc100 follows your suggestion,another error occurs, the following is my bazel configuration
in the fold of the compiler tools, the wasm64-emscripten dir really does not exist
I see, yes we don't currently wasm64 versions of any core libraries in the bazel toolchain. I think this is the same as https://github.com/emscripten-core/emsdk/issues/807. Perhaps we can close this and continue the discussion there?
@phoenix20162016 I had the same problem as yours. For whoever having similar issues, I had to patch emsdk setting FROZEN_CACHE = False
in config.py, then the issue becomes read-only blabla
error, basically indicating emscripten tries to compile libraries and writes into a temporary cache folder but failed.
This of course would fail, due to bazel's idea of keeping builds hermitian. The following are the two different workarounds I tested that worked:
--spawn_strategy=local
. Be careful when using this, especially if this is not a toy project--action_env=EM_CACHE=~/.cache/emscripten_cache
. When FROZEN_CACHE is False, emscripten will try to write to ~/.emscripten_cache
, which will definitely fail in bazel sandbox mode due to permissions. Writing to ~/.cache
folder, however, is allowed.Hope this is helpful for anyone getting stuck with this issue.
in default bazel config, the build env is under 32bit mode, how can i switch to 64bit mode