Add build support for Linux on riscv64 (64 bit RISC-V)

PiperOrigin-RevId: 352813740
Change-Id: I2e8290d28d1a28b993fa381bb433fd1d94ba4e45
This commit is contained in:
A. Unique TensorFlower 2021-01-20 09:53:21 -08:00 committed by TensorFlower Gardener
parent b64b75c35b
commit f93e79aab5
3 changed files with 14 additions and 0 deletions
tensorflow
third_party

View File

@ -266,6 +266,12 @@ config_setting(
visibility = ["//visibility:public"],
)
config_setting(
name = "linux_riscv64",
values = {"cpu": "riscv64"},
visibility = ["//visibility:public"],
)
config_setting(
name = "debug",
values = {

View File

@ -103,6 +103,7 @@ cc_library(
":linux_armeabi": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM32_SRCS,
":linux_aarch64": COMMON_SRCS + ARM_SRCS + LINUX_SRCS + LINUX_ARM64_SRCS,
":linux_mips64": COMMON_SRCS + LINUX_SRCS,
":linux_riscv64": COMMON_SRCS + LINUX_SRCS,
":linux_s390x": COMMON_SRCS + LINUX_SRCS,
":macos_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS,
":macos_arm64": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS,
@ -216,6 +217,11 @@ config_setting(
values = {"cpu": "mips64"},
)
config_setting(
name = "linux_riscv64",
values = {"cpu": "riscv64"},
)
config_setting(
name = "linux_s390x",
values = {"cpu": "s390x"},

View File

@ -26,6 +26,8 @@ def _remote_platform_configure_impl(repository_ctx):
cpu = "arm"
elif machine_type.startswith("mips64"):
cpu = "mips64"
elif machine_type.startswith("riscv64"):
cpu = "riscv64"
exec_properties = repository_ctx.attr.platform_exec_properties