| 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", | 
| Lorenz Brun | 735119f | 2021-03-11 00:30:01 +0100 | [diff] [blame] | 34 |     has_cpp = False, | 
| Serge Bazanski | 9e861a8 | 2020-09-16 13:46:41 +0200 | [diff] [blame] | 35 |     host_includes = [], | 
| Lorenz Brun | 735119f | 2021-03-11 00:30:01 +0100 | [diff] [blame] | 36 |     is_glibc = False, | 
| Serge Bazanski | 9e861a8 | 2020-09-16 13:46:41 +0200 | [diff] [blame] | 37 |     sysroot = "external/musl_sysroot", | 
 | 38 | ) | 
 | 39 |  | 
 | 40 | filegroup( | 
 | 41 |     name = "musl_toolchain_files", | 
 | 42 |     srcs = [ | 
 | 43 |         ":gcc-wrapper.sh", | 
 | 44 |         ":musl.spec", | 
 | 45 |         "@musl_sysroot//:all", | 
 | 46 |     ], | 
 | 47 | ) |