blob: 45d5c6903a3cf377e94f3d422c43d2bdccffc483 [file] [log] [blame]
load("@crt//config:compiler.bzl", "setup")
load("//platforms/cheri/riscv32:devices.bzl", "DEVICES")
package(default_visibility = ["//visibility:public"])
SYSTEM_INCLUDE_PATHS = [
"external/cheriot-llvm/lib/clang/13.0.0/include",
"external/cheriot-llvm/riscv32-unknown-elf/include",
]
filegroup(
name = "compiler_components",
srcs = [
"//toolchains/cheri_llvm/wrappers:all",
"@cheriot-llvm//:all",
],
)
[setup(
name = device.name,
architecture = device.architecture,
artifact_naming = device.artifact_naming,
compiler_components = ":compiler_components",
constraints = device.constraints,
feature_set = device.feature_set,
include_directories = SYSTEM_INCLUDE_PATHS,
params = {
"compiler": "clang",
},
substitutions = device.substitutions,
tools = {
"ar": "wrappers/ar",
"cpp": "wrappers/cpp",
"gcc": "wrappers/clang",
"ld": "wrappers/ld",
"nm": "wrappers/nm",
"objcopy": "wrappers/objcopy",
"objdump": "wrappers/objdump",
"strip": "wrappers/strip",
},
) for device in DEVICES]