Skip to content

Commit d8da85d

Browse files
committed
Added Power support
1 parent 7b28ee2 commit d8da85d

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

WORKSPACE

+11
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ http_archive(
2727
],
2828
)
2929

30+
http_archive(
31+
name = "rules_python",
32+
sha256 = "c68bdc4fbec25de5b5493b8819cfc877c4ea299c0dcb15c244c5a00208cde311",
33+
strip_prefix = "rules_python-0.31.0",
34+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.31.0/rules_python-0.31.0.tar.gz",
35+
)
36+
37+
load("@rules_python//python:repositories.bzl", "py_repositories")
38+
39+
py_repositories()
40+
3041
# Note: boringssl is placed earlier as boringssl needs to be patched for mongodb
3142
http_archive(
3243
name = "boringssl",

third_party/aws-checksums.BUILD

+18-1
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,25 @@ cc_library(
2424
deps = [],
2525
)
2626

27+
config_setting(
28+
name = "ppc_cpu",
29+
values = {"cpu": "ppc"},
30+
)
31+
2732
genrule(
2833
name = "crc_hw_c",
2934
outs = ["crc_hw.c"],
30-
cmd = "\n".join([
35+
cmd = select({
36+
"//:ppc_cpu": "\n".join([
37+
"cat <<'EOF' >$@",
38+
"#include <aws/checksums/private/cpuid.h>",
39+
"#include <aws/checksums/private/crc_priv.h>",
40+
"uint32_t aws_checksums_crc32c_hw(const uint8_t *input, int length, uint32_t previousCrc32) {",
41+
" return aws_checksums_crc32c_sw(input, length, previousCrc32);",
42+
"}",
43+
"EOF",
44+
]),
45+
"//conditions:default": "\n".join([
3146
"cat <<'EOF' >$@",
3247
"#include <aws/checksums/private/cpuid.h>",
3348
"#include <aws/checksums/private/crc_priv.h>",
@@ -39,4 +54,6 @@ genrule(
3954
"}",
4055
"EOF",
4156
]),
57+
}),
4258
)
59+

third_party/pulsar.BUILD

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ cc_library(
3939
"@platforms//cpu:x86_64": [
4040
"lib/checksum/crc32c_sse42.cc",
4141
],
42+
"@platforms//cpu:ppc": [
43+
"lib/checksum/crc32c_sse42.cc",
44+
],
4245
"//conditions:default": [],
4346
}),
4447
hdrs = [

0 commit comments

Comments
 (0)