//build/toolchain/musl-host-gcc: implement
This is a cc_toolchain which runs on x86 systems with Linux/gcc and
targets Smalltown via static musl builds.
It is currently unused, but can be tested by trying to build any
cc_binary with
--crosstool_top=//build/toolchain/musl-host-gcc:musl_host_cc_suite .
Test Plan: This has been tested manually by running it against a simple cc_binary. Another revision on top of this will attempt to build mkfs.xfs with it.
X-Origin-Diff: phab/D623
GitOrigin-RevId: ebdf51ee76d9d5a7fd94725c66ef53783f787df7
diff --git a/build/toolchain/musl-host-gcc/sysroot/BUILD b/build/toolchain/musl-host-gcc/sysroot/BUILD
new file mode 100644
index 0000000..62260ae
--- /dev/null
+++ b/build/toolchain/musl-host-gcc/sysroot/BUILD
@@ -0,0 +1,24 @@
+load(":musl.bzl", "musl_headers")
+load(":linux.bzl", "linux_headers")
+load(":tarball.bzl", "musl_gcc_tarball")
+
+linux_headers(
+ name = "linux_headers",
+ src = "@linux//:all",
+ arch = "x86_64",
+ visibility = ["//visibility:public"],
+)
+
+musl_headers(
+ name = "musl_headers",
+ src = "@musl//:all",
+ arch = "x86_64",
+ visibility = ["//visibility:public"],
+)
+
+musl_gcc_tarball(
+ name = "sysroot",
+ musl = "//third_party/musl",
+ musl_headers = ":musl_headers",
+ linux_headers = ":linux_headers",
+)