mirror of
https://github.com/NilsIrl/dockerc.git
synced 2025-10-05 15:06:55 +08:00
Fix multi-arch build
This commit is contained in:
16
build.zig
16
build.zig
@@ -373,7 +373,13 @@ pub fn build(b: *std.Build) void {
|
|||||||
"-o",
|
"-o",
|
||||||
});
|
});
|
||||||
umoci.setCwd(b.path("umoci"));
|
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.addArg("github.com/opencontainers/umoci/cmd/umoci");
|
||||||
umoci.setEnvironmentVariable(
|
umoci.setEnvironmentVariable(
|
||||||
"CGO_ENABLED",
|
"CGO_ENABLED",
|
||||||
@@ -392,7 +398,13 @@ pub fn build(b: *std.Build) void {
|
|||||||
"-o",
|
"-o",
|
||||||
});
|
});
|
||||||
skopeo.setCwd(b.path("skopeo"));
|
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.addArg("./cmd/skopeo");
|
||||||
|
|
||||||
skopeo.setEnvironmentVariable(
|
skopeo.setEnvironmentVariable(
|
||||||
|
Reference in New Issue
Block a user