From 5be3a4fde164f83c1f496ebf60c3b7ff3bd9692b Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 5 Dec 2025 18:19:54 +0000 Subject: [PATCH] Add riscv64 package download support --- bazel-cc-sysroot-generator | 5 ++++- examples/sysroot-config.toml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bazel-cc-sysroot-generator b/bazel-cc-sysroot-generator index 73bf176..996443c 100755 --- a/bazel-cc-sysroot-generator +++ b/bazel-cc-sysroot-generator @@ -40,6 +40,7 @@ Arch = collections.namedtuple("Arch", ["id", "ubuntu_id", "ubuntu_mirror"]) MirrorInfo = collections.namedtuple("MirrorInfo", ["url", "files"]) ARM64 = Arch("aarch64", "arm64", "http://ports.ubuntu.com/ubuntu-ports") +RISCV64 = Arch("riscv64", "riscv64", "http://ports.ubuntu.com/ubuntu-ports") X86_64 = Arch("x86_64", "amd64", "http://gb.archive.ubuntu.com/ubuntu") _PPA_URL = "http://ppa.launchpad.net" @@ -342,9 +343,11 @@ def _generate_ubuntu_sysroot(os_name: str, platform: dict[str, Any]) -> None: arch = ARM64 elif arch_str in ("amd64", "x86_64"): arch = X86_64 + elif arch_str == "riscv64": + arch = RISCV64 else: raise SystemExit( - f"error: unsupported arch '{arch_str}', valid options: aarch64, x86_64" + f"error: unsupported arch '{arch_str}', valid options: aarch64, riscv64, x86_64" ) sysroot_dir = _setup_sysroot(f"{os_name}-{arch.id}") diff --git a/examples/sysroot-config.toml b/examples/sysroot-config.toml index bdc2ba0..c5dfa7a 100644 --- a/examples/sysroot-config.toml +++ b/examples/sysroot-config.toml @@ -1,6 +1,6 @@ [[platforms]] os = "jammy" -archs = ["aarch64", "x86_64"] +archs = ["aarch64", "x86_64", "riscv64"] packages = [ "libbsd-dev", "libbsd0",