Skip to content

Commit

Permalink
Fix multi-arch build
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsIrl committed Aug 16, 2024
1 parent 513216a commit f90db2e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,13 @@ pub fn build(b: *std.Build) void {
"-o",
});
umoci.setCwd(b.path("umoci"));
const umoci_output = umoci.addOutputFileArg("umoci");
const umoci_output = umoci.addOutputFileArg(
std.fmt.allocPrint(
b.allocator,
"umoci_{s}",
.{go_cpu_arch},
) catch @panic("OOM"),
);
umoci.addArg("github.com/opencontainers/umoci/cmd/umoci");
umoci.setEnvironmentVariable(
"CGO_ENABLED",
Expand All @@ -392,7 +398,13 @@ pub fn build(b: *std.Build) void {
"-o",
});
skopeo.setCwd(b.path("skopeo"));
const skopeo_output = skopeo.addOutputFileArg("skopeo");
const skopeo_output = skopeo.addOutputFileArg(
std.fmt.allocPrint(
b.allocator,
"skopeo_{s}",
.{go_cpu_arch},
) catch @panic("OOM"),
);
skopeo.addArg("./cmd/skopeo");

skopeo.setEnvironmentVariable(
Expand Down

0 comments on commit f90db2e

Please sign in to comment.