Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions toolchain/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ def cc_toolchain_config(
"clang",
"glibc_unknown",
),
"none-riscv32": (
"clang-riscv32-none",
"riscv32",
"unknown",
"clang",
"unknown",
"unknown",
),
"none-x86_64": (
"clang-x86_64-none",
"k8",
Expand Down
2 changes: 2 additions & 0 deletions toolchain/internal/common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ SUPPORTED_TARGETS = [
("linux", "armv7"),
("darwin", "x86_64"),
("darwin", "aarch64"),
("none", "riscv32"),
("none", "wasm32"),
("none", "wasm64"),
("none", "x86_64"),
Expand All @@ -27,6 +28,7 @@ SUPPORTED_TARGETS = [

# These are targets that can build without a sysroot.
SUPPORTED_NO_SYSROOT_TARGETS = [
("none", "riscv32"),
("none", "x86_64"),
]

Expand Down
3 changes: 2 additions & 1 deletion toolchain/internal/configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _cc_toolchain_str(
if exec_os == target_os and exec_arch == target_arch:
# For darwin -> darwin, we can use the macOS SDK path.
sysroot_path = _default_sysroot_path(rctx, exec_os)
elif target_pair in _supported_no_sysroot_targets:
elif (target_os, target_arch) in _supported_no_sysroot_targets:
sysroot_path = ""
else:
# We are trying to cross-compile without a sysroot, let's bail.
Expand All @@ -331,6 +331,7 @@ def _cc_toolchain_str(
"linux-aarch64": "aarch64-unknown-linux-gnu",
"linux-armv7": "armv7-unknown-linux-gnueabihf",
"linux-x86_64": "x86_64-unknown-linux-gnu",
"none-riscv32": "riscv32-unknown-none-elf",
"none-x86_64": "x86_64-unknown-none",
"wasm32": "wasm32-unknown-unknown",
"wasm64": "wasm64-unknown-unknown",
Expand Down
Loading