Skip to content

Commit 76e226d

Browse files
authored
Automatically use system's crypto library on Linux/s390x. (#220)
BoringSSL doesn't support Linux/s390x. Signed-off-by: Piotr Sikora <piotrsikora@google.com>
1 parent 4540d32 commit 76e226d

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

bazel/BUILD

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@bazel_skylib//lib:selects.bzl", "selects")
2+
13
config_setting(
24
name = "runtime_v8",
35
values = {"define": "runtime=v8"},
@@ -19,6 +21,19 @@ config_setting(
1921
)
2022

2123
config_setting(
22-
name = "crypto_system",
24+
name = "requested_crypto_system",
2325
values = {"define": "crypto=system"},
2426
)
27+
28+
config_setting(
29+
name = "linux_s390x",
30+
values = {"cpu": "s390x"},
31+
)
32+
33+
selects.config_setting_group(
34+
name = "crypto_system",
35+
match_any = [
36+
":requested_crypto_system",
37+
":linux_s390x",
38+
],
39+
)

bazel/repositories.bzl

+9
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,12 @@ def proxy_wasm_cpp_host_repositories():
174174
strip_prefix = "rules_python-0.6.0",
175175
url = "https://github.com/bazelbuild/rules_python/archive/0.6.0.tar.gz",
176176
)
177+
178+
http_archive(
179+
name = "bazel_skylib",
180+
urls = [
181+
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
182+
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
183+
],
184+
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
185+
)

0 commit comments

Comments
 (0)