treewide: format repo with buildifier
Change-Id: Ia7aebeb7bba5b119c9157d1ad805cc477bcbb68a
Reviewed-on: https://review.monogon.dev/c/monogon/+/3774
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/build/toolchain/musl-host-gcc/sysroot/BUILD.bazel b/build/toolchain/musl-host-gcc/sysroot/BUILD.bazel
index 2979ee1..dbd2982 100644
--- a/build/toolchain/musl-host-gcc/sysroot/BUILD.bazel
+++ b/build/toolchain/musl-host-gcc/sysroot/BUILD.bazel
@@ -1,5 +1,5 @@
-load(":musl.bzl", "musl_headers")
load(":linux.bzl", "linux_headers")
+load(":musl.bzl", "musl_headers")
load(":tarball.bzl", "musl_gcc_tarball")
linux_headers(
diff --git a/build/toolchain/musl-host-gcc/sysroot/linux.bzl b/build/toolchain/musl-host-gcc/sysroot/linux.bzl
index e9cf40a..0d6b999 100644
--- a/build/toolchain/musl-host-gcc/sysroot/linux.bzl
+++ b/build/toolchain/musl-host-gcc/sysroot/linux.bzl
@@ -33,7 +33,7 @@
use_default_shell_env = True,
command = "make -C \"$1\" headers_install ARCH=\"$2\" INSTALL_HDR_PATH=\"$(pwd)/$3\" > /dev/null && mv \"$3/include/\"* \"$3/\" && rmdir \"$3/include\"",
)
- return [DefaultInfo(files=depset([hdrs_dir]))]
+ return [DefaultInfo(files = depset([hdrs_dir]))]
linux_headers = rule(
implementation = _linux_headers,
diff --git a/build/toolchain/musl-host-gcc/sysroot/musl.bzl b/build/toolchain/musl-host-gcc/sysroot/musl.bzl
index 5055b83..f5dba26 100644
--- a/build/toolchain/musl-host-gcc/sysroot/musl.bzl
+++ b/build/toolchain/musl-host-gcc/sysroot/musl.bzl
@@ -33,7 +33,7 @@
use_default_shell_env = True,
command = "make -C \"$1\" install-headers ARCH=\"$2\" includedir=\"$(pwd)/$3\" > /dev/null",
)
- return [DefaultInfo(files=depset([hdrs_dir]))]
+ return [DefaultInfo(files = depset([hdrs_dir]))]
musl_headers = rule(
implementation = _musl_headers,
diff --git a/build/toolchain/musl-host-gcc/sysroot/tarball.bzl b/build/toolchain/musl-host-gcc/sysroot/tarball.bzl
index d7f18aa..a7e407d 100644
--- a/build/toolchain/musl-host-gcc/sysroot/tarball.bzl
+++ b/build/toolchain/musl-host-gcc/sysroot/tarball.bzl
@@ -14,17 +14,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-load(
- "//build/utils:detect_root.bzl",
- "detect_root",
-)
-
"""
Build a sysroot-style tarball containing musl/linux headers and libraries.
This can then be used to build a C toolchain that builds C/C++ binaries for Metropolis nodes.
"""
+load(
+ "//build/utils:detect_root.bzl",
+ "detect_root",
+)
+
def _musl_gcc_tarball(ctx):
tarball_name = ctx.attr.name + ".tar.xz"
tarball = ctx.actions.declare_file(tarball_name)
@@ -37,7 +37,6 @@
compiler_headers_path = "lib/gcc/x86_64-redhat-linux/14/include"
musl_root = detect_root(ctx.attr.musl)
- musl_files = ctx.files.musl
# This builds a tarball containing musl, musl headers and linux headers.
# This is done by some carefully crafted tar command line arguments that rewrite
@@ -50,16 +49,16 @@
# Order is important here as this is a terrible hack producing a tar file with duplicate files. The decompressor
# will then overwrite the wrong one with the correct one for us.
- arguments += [compiler_headers_path]
+ arguments.append(compiler_headers_path)
command += " --transform 's|^'$2'|include|' /$2"
- arguments += [musl_headers_path]
+ arguments.append(musl_headers_path)
command += " --transform 's|^'$3'|include|' $3"
- arguments += [linux_headers_path]
+ arguments.append(linux_headers_path)
command += " --transform 's|^'$4'|include|' $4"
- arguments += [musl_root]
+ arguments.append(musl_root)
command += " --transform 's|^'$5'|lib|' $5"
ctx.actions.run_shell(
diff --git a/build/toolchain/musl-host-gcc/sysroot_repository.bzl b/build/toolchain/musl-host-gcc/sysroot_repository.bzl
index 253abbf..72882ea 100644
--- a/build/toolchain/musl-host-gcc/sysroot_repository.bzl
+++ b/build/toolchain/musl-host-gcc/sysroot_repository.bzl
@@ -30,7 +30,6 @@
)
""")
-
musl_sysroot_rule = repository_rule(
implementation = _musl_sysroot_rule_impl,
attrs = {