• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load(":cc_config.bzl", "cc_toolchain_config")
2
3package(default_visibility = ["//visibility:public"])
4
5licenses(["restricted"])  # GPLv3
6
7cc_toolchain_suite(
8    name = "toolchain",
9    toolchains = {
10        "aarch64": ":cc-compiler-aarch64",
11        "armhf": ":cc-compiler-armhf",
12    },
13)
14
15filegroup(
16    name = "empty",
17    srcs = [],
18)
19
20filegroup(
21    name = "aarch64_toolchain_all_files",
22    srcs = [
23        "@aarch64_linux_toolchain//:compiler_pieces",
24    ],
25)
26
27filegroup(
28    name = "armhf_toolchain_all_files",
29    srcs = [
30        "@armhf_linux_toolchain//:compiler_pieces",
31    ],
32)
33
34cc_toolchain_config(
35    name = "aarch64_toolchain_config",
36    cpu = "aarch64",
37)
38
39cc_toolchain_config(
40    name = "armhf_toolchain_config",
41    cpu = "armhf",
42)
43
44cc_toolchain(
45    name = "cc-compiler-aarch64",
46    all_files = ":aarch64_toolchain_all_files",
47    compiler_files = ":aarch64_toolchain_all_files",
48    dwp_files = ":empty",
49    linker_files = ":aarch64_toolchain_all_files",
50    objcopy_files = "aarch64_toolchain_all_files",
51    strip_files = "aarch64_toolchain_all_files",
52    supports_param_files = 1,
53    toolchain_config = ":aarch64_toolchain_config",
54)
55
56cc_toolchain(
57    name = "cc-compiler-armhf",
58    all_files = ":armhf_toolchain_all_files",
59    compiler_files = ":armhf_toolchain_all_files",
60    dwp_files = ":empty",
61    linker_files = ":armhf_toolchain_all_files",
62    objcopy_files = "armhf_toolchain_all_files",
63    strip_files = "armhf_toolchain_all_files",
64    supports_param_files = 1,
65    toolchain_config = ":armhf_toolchain_config",
66)
67