blob: 656bb45ed0dc75865a8eeff31d3631bbc1d67b23 [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",
Lorenz Brun735119f2021-03-11 00:30:01 +010034 has_cpp = False,
Serge Bazanski9e861a82020-09-16 13:46:41 +020035 host_includes = [],
Lorenz Brun735119f2021-03-11 00:30:01 +010036 is_glibc = False,
Serge Bazanski9e861a82020-09-16 13:46:41 +020037 sysroot = "external/musl_sysroot",
38)
39
40filegroup(
41 name = "musl_toolchain_files",
42 srcs = [
43 ":gcc-wrapper.sh",
44 ":musl.spec",
45 "@musl_sysroot//:all",
46 ],
47)