-
Notifications
You must be signed in to change notification settings - Fork 697
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
compile wams64 using bazel mode #1362
Comments
To build for wasm64 you can add |
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 #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 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:
Hope this is helpful for anyone getting stuck with this issue. |
This is a working solution for generating a separate Emscripten cache. Note that this requires an additional entry in the workspace as follows: ```starlark load("@emsdk//:emscripten_cache.bzl", emsdk_emscripten_cache = "emscripten_cache") emsdk_emscripten_cache() ``` When used like this, the default Emscripten cache will be used. However, if the entry is as follows: ```starlark load("@emsdk//:emscripten_cache.bzl", emsdk_emscripten_cache = "emscripten_cache") emsdk_emscripten_cache(flags = ["--lto"]) ``` Then embuilder will be called to build all system libraries and ports (i.e., the `ALL` option to embuilder) with the LTO option enabled. This can take awhile, so I have also made possible to specify which libraries you want to build explicitly: ```starlark load("@emsdk//:emscripten_cache.bzl", emsdk_emscripten_cache = "emscripten_cache") emsdk_emscripten_cache( flags = ["--lto"], libraries = [ "crtbegin", "libprintf_long_double-debug", "libstubs-debug", "libnoexit", "libc-debug", "libdlmalloc", "libcompiler_rt", "libc++-noexcept", "libc++abi-debug-noexcept", "libsockets" ] ) ``` Resolves #807, resolves #971, resolves #1099, resolves #1362, resolves #1401
in default bazel config, the build env is under 32bit mode, how can i switch to 64bit mode
The text was updated successfully, but these errors were encountered: