Skip to content

Commit

Permalink
add linux_arm64 platform
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Dec 29, 2020
1 parent 1e26e03 commit db3308e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
8 changes: 8 additions & 0 deletions platforms/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ config_setting(
"@platforms//cpu:x86_64",
],
)

config_setting(
name = "linux_arm64",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:aarch64",
],
)
13 changes: 12 additions & 1 deletion protobuf.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ alias(
actual = select({
"@net_ankiweb_anki//platforms:windows_x86_64": "@protoc_bin_windows//:bin/protoc.exe",
"@net_ankiweb_anki//platforms:macos_x86_64": "@protoc_bin_macos//:bin/protoc",
"@net_ankiweb_anki//platforms:linux_x86_64": "@protoc_bin_linux_x86_64//:bin/protoc"
"@net_ankiweb_anki//platforms:linux_x86_64": "@protoc_bin_linux_x86_64//:bin/protoc",
"@net_ankiweb_anki//platforms:linux_arm64": "@protoc_bin_linux_arm64//:bin/protoc"
}),
visibility = ["//visibility:public"]
)
Expand Down Expand Up @@ -47,6 +48,16 @@ def setup_protobuf_binary(name):
build_file_content = """exports_files(["bin/protoc"])""",
)

maybe(
http_archive,
name = "protoc_bin_linux_arm64",
urls = [
"https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protoc-3.14.0-linux-aarch_64.zip",
],
sha256 = "67db019c10ad0a151373278383e4e9b756dc90c3cea6c1244d5d5bd230af7c1a",
build_file_content = """exports_files(["bin/protoc"])""",
)

maybe(
http_archive,
name = "protoc_bin_windows",
Expand Down
1 change: 1 addition & 0 deletions pylib/anki/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ py_wheel(
"//platforms:windows_x86_64": "win_amd64",
"//platforms:macos_x86_64": "macosx_10_7_x86_64",
"//platforms:linux_x86_64": "manylinux2014_x86_64",
"//platforms:linux_arm64": "manylinux2014_aarch64",
}),
python_tag = "cp38",
python_version = ">=3.8",
Expand Down

0 comments on commit db3308e

Please sign in to comment.