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

Cannot link absl with Standalone Wasm module #693

Closed
bianpengyuan opened this issue May 26, 2020 · 3 comments
Closed

Cannot link absl with Standalone Wasm module #693

bianpengyuan opened this issue May 26, 2020 · 3 comments

Comments

@bianpengyuan
Copy link

When using bazel compile Stand alone Wasm module with absl, emscripten compiles shared:ERROR: STANDALONE_WASM does not support pthreads yet. We have to apply the following patch to work around this:

diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel
index 76122da..ac419f2 100644
--- a/absl/base/BUILD.bazel
+++ b/absl/base/BUILD.bazel
@@ -153,7 +153,7 @@ cc_library(
     copts = ABSL_DEFAULT_COPTS,
     linkopts = select({
         "//absl:windows": [],
-        "//conditions:default": ["-pthread"],
+        "//conditions:default": [],
     }) + ABSL_DEFAULT_LINKOPTS,
     visibility = [
         "//visibility:public",
@@ -214,7 +214,7 @@ cc_library(
         "//absl:windows": [
             "-DEFAULTLIB:advapi32.lib",
         ],
-        "//conditions:default": ["-pthread"],
+        "//conditions:default": [],
     }) + ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":atomic_hook",

Can absl bazel build add another platform to support Standalone Wasm?

@bianpengyuan
Copy link
Author

Effort to add wasm as a cpu option to bazel: bazelbuild/platforms#12

@bianpengyuan
Copy link
Author

This is done I believe:

name = "wasm",

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
@bianpengyuan and others