Skip to content

Commit

Permalink
Merge pull request #26 from buildbarn/cgo_patch
Browse files Browse the repository at this point in the history
Add patch to bb-storage to build images with cgo
  • Loading branch information
mortenmj authored Oct 11, 2024
2 parents 24b38d6 + a97a6a0 commit 9a34ad5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bazel_dep(name = "com_github_buildbarn_bb_storage")
bazel_dep(name = "gazelle", version = "0.38.0")
bazel_dep(name = "googleapis", version = "0.0.0-20240819-fe8ba054a")
bazel_dep(name = "googletest", version = "1.15.2")
bazel_dep(name = "rules_go", version = "0.50.0")
bazel_dep(name = "rules_go", version = "0.50.1")
bazel_dep(name = "rules_jsonnet", version = "0.6.0")
bazel_dep(name = "rules_oci", version = "1.8.0")
bazel_dep(name = "toolchains_llvm", version = "1.1.2")
Expand All @@ -20,6 +20,7 @@ git_override(
module_name = "com_github_buildbarn_bb_storage",
commit = "0941111f29e31905e4081e6262bccf0c123940ed",
patches = [
"//:patches/com_buildbarn_bb_storage/containers.diff",
"//:patches/com_buildbarn_bb_storage/workflows_template.diff",
],
remote = "https://github.com/buildbarn/bb-storage.git",
Expand Down
13 changes: 13 additions & 0 deletions patches/com_buildbarn_bb_storage/containers.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git tools/container.bzl tools/container.bzl
index e4aa679..9a6f756 100644
--- tools/container.bzl
+++ tools/container.bzl
@@ -32,7 +32,7 @@ def multiarch_go_image(name, binary):

for arch in ["amd64", "arm64"]:
arch_image_target = "{}_{}_image".format(name, arch)
- target_platform = "@rules_go//go/toolchain:linux_" + arch
+ target_platform = "@rules_go//go/toolchain:linux_" + arch + "_cgo"
images.append(arch_image_target)
platform_transition_filegroup(
name = arch_image_target,

0 comments on commit 9a34ad5

Please sign in to comment.