blob: 561e311a68127d909b7afa278a74d638ccac74d6 [file] [log] [blame]
Serge Bazanski9e861a82020-09-16 13:46:41 +02001load("//build/toolchain:cc_toolchain_config.bzl", "host_cc_toolchain_config")
2
3# This file defines //build/toolchain/musl-host-gcc:musl_host_cc_suite.
4#
5# This is a C++ toolchain that uses GCC from the host at hardcoded paths, with
Serge Bazanski662b5b32020-12-21 13:49:00 +01006# a pre-built sysroot tarball that targets Metropolis nodes with musl and Linux
7# headers. It's a superset of //build/toolchain:host_cc_suite.
Serge Bazanski9e861a82020-09-16 13:46:41 +02008# For more information, see README.md.
9
10cc_toolchain_suite(
11 name = "musl_host_cc_suite",
12 toolchains = {
13 "k8": ":musl_host_cc_k8_toolchain",
14 },
15 visibility = ["//visibility:public"],
16)
17
18cc_toolchain(
19 name = "musl_host_cc_k8_toolchain",
20 all_files = ":musl_toolchain_files",
21 compiler_files = ":musl_toolchain_files",
22 dwp_files = ":musl_toolchain_files",
23 linker_files = ":musl_toolchain_files",
24 objcopy_files = ":musl_toolchain_files",
25 strip_files = ":musl_toolchain_files",
26 supports_param_files = 0,
27 toolchain_config = ":musl_host_cc_k8_toolchain_config",
28 toolchain_identifier = "host-musl-k8-toolchain",
29)
30
31host_cc_toolchain_config(
32 name = "musl_host_cc_k8_toolchain_config",
33 gcc = "gcc-wrapper.sh",
34 host_includes = [],
35 sysroot = "external/musl_sysroot",
36)
37
38filegroup(
39 name = "musl_toolchain_files",
40 srcs = [
41 ":gcc-wrapper.sh",
42 ":musl.spec",
43 "@musl_sysroot//:all",
44 ],
45)