-
Notifications
You must be signed in to change notification settings - Fork 735
[bazel] Fix and update emscripten_toolchain #1060
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
Conversation
This allows consumption of this script for non-Bazel usage. For example, for `rules_foreign_cc`.
when making changes to the bazel toolchain would you mind prefixing the PR title with |
f3f4cc6
to
02ccf04
Compare
* Removes `asm` CPU target. * [feat] Add `wasm32` and `wasm64` CPU targets. * Fix static library linker flags. * Use the new `platform` API for toolchains * Add a `emsdk_register_toolchains` for Platform toolchains.
This reverts commit 03cec6f.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for the PR! I'm excited to get this in. Apologies for the slowness in getting to this review; it's a busy holiday season right now where I am.
"//command_line_option:features": features, | ||
"//command_line_option:dynamic_mode": "off", | ||
"//command_line_option:linkopt": linkopts, | ||
"//command_line_option:platforms": [], | ||
"//command_line_option:incompatible_enable_cc_toolchain_resolution": True, | ||
"//command_line_option:platforms": ["@emsdk//:cpu_wasm32"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be set to cpu_wasm64 if we're targeting wasm64?
f.write(param) | ||
f.write('\n') | ||
sys.argv[1] = '@' + new_param_filename | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are there cases where we wouldn't only get the single @ file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This occurs in, e.g., foreign_cc builds.
@@ -54,17 +56,3 @@ and all of its dependencies, and does not require amending `.bazelrc`. This | |||
is the preferred way, since it also unpacks the resulting tarball. | |||
|
|||
See `test_external/` for an example using [embind](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html). | |||
|
|||
### Using --config=wasm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does --config=wasm no longer work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In an ideal world, --config=wasm32
and --config=wasm64
are both allowed, and --config=wasm
just points to --config=wasm32
for backwards compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean by "backwards-compatibility". If we update the config here, it doesn't imply it propagates to the user. In particular, this only affects developers of this repo, not external users.
I'll reopen this with my internal account. |
This PR makes several changes. See the commit descriptions.