-
Notifications
You must be signed in to change notification settings - Fork 739
wasm_cc_binary: Use WASI OS for standalone builds #1262
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,5 +82,6 @@ platform( | |
name = "platform_wasm", | ||
constraint_values = [ | ||
"@platforms//cpu:wasm32", | ||
"@platforms//os:wasi", | ||
], | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ def _wasm_transition_impl(settings, attr): | |
"//command_line_option:features": features, | ||
"//command_line_option:dynamic_mode": "off", | ||
"//command_line_option:linkopt": linkopts, | ||
"//command_line_option:platforms": ["@emsdk//:platform_wasm"], | ||
"//command_line_option:platforms": [attr.platform], | ||
"//command_line_option:custom_malloc": "@emsdk//emscripten_toolchain:malloc", | ||
} | ||
|
||
|
@@ -82,6 +82,9 @@ _WASM_BINARY_COMMON_ATTRS = { | |
"exit_runtime": attr.bool( | ||
default = False, | ||
), | ||
"platform": attr.label( | ||
default = "@emsdk//:platform_wasm", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of giving the user the ability to input an arbitrary platform string, what if we always set the platform to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good, toggled off of attr.standalone. |
||
), | ||
"threads": attr.string( | ||
default = "_default", | ||
values = ["_default", "emscripten", "off"], | ||
|
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.
definitely against this. the os is more appropriately
emscripten
, although that doesn't exist in bazel's upstream os list.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.
ACK, added as platform_wasi instead