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

No valid cpus #1

Open
joetoth opened this issue Sep 20, 2018 · 2 comments
Open

No valid cpus #1

joetoth opened this issue Sep 20, 2018 · 2 comments

Comments

@joetoth
Copy link

joetoth commented Sep 20, 2018

I just tried and got the following error.

~/projects/rules_emscripten master $ bazel build :helloworld.html
ERROR: No default_toolchain found for cpu 'emscripten'. Valid cpus are: [
]
INFO: Elapsed time: 0.099s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

bazel version 0.17.1

Let me know if there is anything else you need.

Thanks!

@tdresser
Copy link

I think this is due to a missing default_toolchain entry in CROSSTOOL. I haven't managed to get this to work just adding it though.

I suspect the CROSSTOOL format has changed since this was authored?

@tdresser
Copy link

tdresser commented Oct 27, 2018

This seems to be working.

bazel build src/test_wasm.js \
              --crosstool_top=@emscripten//toolchain:emscripten \
              --compiler=emscripten \
              --cpu=emscripten \
              --host_crosstool_top=@bazel_tools//tools/cpp:toolchain

Looks like you need to specify both the compiler and cpu for this to work.
I was also missing the --host_crosstool_top from the provided bazelrc for a while, which wasn't helping.

I think this is mainly a case of missing documentation.

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