summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Rei Shimizu <Shikugawa@gmail.com>2020-07-13 06:21:35 +0900
committerGravatar GitHub <noreply@github.com>2020-07-12 17:21:35 -0400
commit302b250e1d917ede77b5ff00a6fd9f28430f1563 (patch)
tree1f656d24c5d73c75d55e521950c4001259826296
parent61d8bc057cacd2355be9e34aa6856b87de3c4e7f (diff)
Disable pthread for standalone wasm build support (#721)
* Disable pthread for wasm build support * wasm -> wasm32
-rw-r--r--absl/BUILD.bazel5
-rw-r--r--absl/base/BUILD.bazel2
-rw-r--r--absl/debugging/BUILD.bazel1
-rw-r--r--absl/random/internal/BUILD.bazel1
-rw-r--r--absl/synchronization/BUILD.bazel1
5 files changed, 10 insertions, 0 deletions
diff --git a/absl/BUILD.bazel b/absl/BUILD.bazel
index f7fc2a7f..e45d15a5 100644
--- a/absl/BUILD.bazel
+++ b/absl/BUILD.bazel
@@ -58,3 +58,8 @@ config_setting(
},
visibility = [":__subpackages__"],
)
+
+config_setting(
+ name = "wasm",
+ values = {"cpu": "wasm32"},
+)
diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel
index 745a598f..23f2763a 100644
--- a/absl/base/BUILD.bazel
+++ b/absl/base/BUILD.bazel
@@ -161,6 +161,7 @@ cc_library(
copts = ABSL_DEFAULT_COPTS,
linkopts = select({
"//absl:windows": [],
+ "//absl:wasm": [],
"//conditions:default": ["-pthread"],
}) + ABSL_DEFAULT_LINKOPTS,
visibility = [
@@ -222,6 +223,7 @@ cc_library(
"//absl:windows": [
"-DEFAULTLIB:advapi32.lib",
],
+ "//absl:wasm": [],
"//conditions:default": ["-pthread"],
}) + ABSL_DEFAULT_LINKOPTS,
deps = [
diff --git a/absl/debugging/BUILD.bazel b/absl/debugging/BUILD.bazel
index d3362467..bdc50e09 100644
--- a/absl/debugging/BUILD.bazel
+++ b/absl/debugging/BUILD.bazel
@@ -148,6 +148,7 @@ cc_test(
copts = ABSL_TEST_COPTS,
linkopts = select({
"//absl:windows": [],
+ "//absl:wasm": [],
"//conditions:default": ["-pthread"],
}) + ABSL_DEFAULT_LINKOPTS,
deps = [
diff --git a/absl/random/internal/BUILD.bazel b/absl/random/internal/BUILD.bazel
index a0eba5e8..83843b4c 100644
--- a/absl/random/internal/BUILD.bazel
+++ b/absl/random/internal/BUILD.bazel
@@ -99,6 +99,7 @@ cc_library(
copts = ABSL_DEFAULT_COPTS,
linkopts = select({
"//absl:windows": [],
+ "//absl:wasm": [],
"//conditions:default": ["-pthread"],
}) + ABSL_DEFAULT_LINKOPTS,
deps = [
diff --git a/absl/synchronization/BUILD.bazel b/absl/synchronization/BUILD.bazel
index 3f876b9f..2cd5ae20 100644
--- a/absl/synchronization/BUILD.bazel
+++ b/absl/synchronization/BUILD.bazel
@@ -90,6 +90,7 @@ cc_library(
copts = ABSL_DEFAULT_COPTS,
linkopts = select({
"//absl:windows": [],
+ "//absl:wasm": [],
"//conditions:default": ["-pthread"],
}) + ABSL_DEFAULT_LINKOPTS,
deps = [