Closed allsey87 closed 4 months ago
try passing --platforms=@emsdk//:platform_wasm
and set the toolchains
attribute of your genrule to @bazel_tools//tools/cpp:current_cc_toolchain
This works although for completeness, I would add that it doesn't seem like there is a need to pass @bazel_tools//tools/cpp:current_cc_toolchain
to the toolchains
attribute of the genrule if --platforms=@emsdk//:platform_wasm
was already specified.
For the moment, I have just placed build --platforms=@emsdk//:platform_wasm
in my .bazelrc
since my whole workspace is targeting Emscripten.
While
wasm_cc_binary
works nicely, I feel like I am quite in the dark when it comes to figuring out build a cmake or autotools based project inside of Bazel + Emscripten. For example, I am currently trying to getlibffi
to build inside Bazel using this script and have come up with the following:However, this is reporting error:
Am I do something wrong here or is there an issue with the toolchain configuration?