Skip to content

Commit

Permalink
make bazel build work on aarch64/arm linux
Browse files Browse the repository at this point in the history
make
```
bazel build //tensorflow/tools/pip_package:build_pip_package
````
work again on aarch64 (e.g., EdgeTPU Dev board and Jetson boards)
and arm (e.g, Raspberry Pi 3/4 boards) Linux platforms

without this patch, I saw

```
...
ERROR: While resolving toolchains for target //tensorflow:libtensorflow_framework.so.2.1.0: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See bazelbuild/bazel#10134 for details and migration instructions.
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See bazelbuild/bazel#10134 for details and migration instructions.
```
  • Loading branch information
freedomtan committed May 6, 2020
1 parent 9ddbe97 commit 8530442
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion third_party/aws/aws-c-common.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ cc_library(
srcs = select({
"@org_tensorflow//tensorflow:linux_aarch64": glob([
"source/posix/*.c",
"source/arch/*.c"
]),
"@org_tensorflow//tensorflow:linux_x86_64": glob([
"source/posix/*.c",
Expand Down
4 changes: 4 additions & 0 deletions third_party/remote_config/remote_platform_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def _remote_platform_configure_impl(repository_ctx):
cpu = "ppc"
elif machine_type.startswith("s390x"):
cpu = "s390x"
elif machine_type.startswith("aarch64"):
cpu = "aarch64"
elif machine_type.startswith("arm"):
cpu = "arm"

exec_properties = repository_ctx.attr.platform_exec_properties

Expand Down

0 comments on commit 8530442

Please sign in to comment.