-
Notifications
You must be signed in to change notification settings - Fork 737
Use emsdk as external bazel dependency #766
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
Use emsdk as external bazel dependency #766
Conversation
I'm not too famiilar with this stuff but it looks like there are a few different things going on here. If its possible to split into smaller changes that would great (maybe its isn't?). |
Most of the changes are interlinked, I think it was possible to stop early on after externalising @emsdk (i.e. tests would pass but the change would be incomplete still), but after that it was a rollercoaster. |
@bkotsopoulossc To implement this, you need to do the toolchain as you said, then register it in workspace (ideally provided in deps) and also add platform in transition in |
Another problematic bit is that |
And yes, the trick with strip_prefix is how i am using it in externals right now :) I'll add a more comprehensive readme post merge, need commit hash |
Makes total sense about keeping the scope of this PR down. I wonder if there is an interest in trying to support the platforms use case later on though? |
Well, bazel docs blatantly state that this is the future and all new crossplatform jazz should be developed with that in mind. The reason why cc rules are behind is because some platforms (android, primarily) does not support it yet |
Wait are you trying to actually use wasm64? That is something that doesn't really exist yet, at least not at the emscripten level. Do you mean wasm32? |
I think it's just a platforms flag. It's not "real" architecture, it's more of a label. Should be done against |
I didn't actually try either, but didn't know if it made a difference since they seem more like labels like you mentioned? Anyways, good to know about using |
@bkotsopoulossc So until that gets resolved, you do need to use |
so because test-bazel has been renamed, circleci expects it to pass should I rename it back and have test-bazel and test-bazel-mac instead? |
No thats OK, we just need to teach github about these new test names. |
I temporarly removed "test-bazel" from the list of required steps to submit. @walkingeyerobot if you are happy with this change I an land with with force |
Oh looks like it worked on its own. |
Pull request was closed
Cheers! |
Damit.. I closed it by accident. I'm not sure what you want the final commit message to look like. I'll leave that to you and/or @walkingeyerobot . |
Are you good with the current PR title and description for the squashed change? |
|
Does what it says on the tin. I'm gonna add a readme update tomorrow |
Sorry to revive this, any further thoughts on platform-based toolchain resolution? RE: #766 (comment) |
I am strongly in favor of using bazel's platforms in this toolchain. The original creation of this toolchain (long before it was committed here) predated the concept of bazel platforms. Supporting the users of that version is my day job, making this a particularly hairy problem for me. I will sadly not have time until at least Q3 (July) to start working on this, but I would be more than happy to help out with or review a design or PR for this in the meantime. If not, I will get around to doing this myself eventually (tm). cc @trybka |
* Makes provided bazel rules look up @emsdk workspace instead of local workspace * Uses system-specific emscripten binaries instead of defaulting to linux * Provides macros for loading emsdk dependencies (nodejs and emscripten binaries) * Unhardcodes paths in bazel rules and .sh wrappers * `update_bazel_workspace.sh` now updates `revisions.bzl` * `emscripten_deps()` can be fed with specific emscripten version * Adds external usage test Addresses #650 and #696
update_bazel_workspace.sh
now updatesrevisions.bzl
emscripten_deps()
can be fed with specific emscripten versionAddresses #650 and #696