Serge Bazanski | 9e861a8 | 2020-09-16 13:46:41 +0200 | [diff] [blame] | 1 | load("//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 Bazanski | 662b5b3 | 2020-12-21 13:49:00 +0100 | [diff] [blame^] | 6 | # 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 Bazanski | 9e861a8 | 2020-09-16 13:46:41 +0200 | [diff] [blame] | 8 | # For more information, see README.md. |
| 9 | |
| 10 | cc_toolchain_suite( |
| 11 | name = "musl_host_cc_suite", |
| 12 | toolchains = { |
| 13 | "k8": ":musl_host_cc_k8_toolchain", |
| 14 | }, |
| 15 | visibility = ["//visibility:public"], |
| 16 | ) |
| 17 | |
| 18 | cc_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 | |
| 31 | host_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 | |
| 38 | filegroup( |
| 39 | name = "musl_toolchain_files", |
| 40 | srcs = [ |
| 41 | ":gcc-wrapper.sh", |
| 42 | ":musl.spec", |
| 43 | "@musl_sysroot//:all", |
| 44 | ], |
| 45 | ) |