Skip to content

Commit

Permalink
build.zig: override MICROKIT_SDK environment varaible
Browse files Browse the repository at this point in the history
We always have to provide -Dsdk=<sdk> when using build.zig
and we don't want the Microkit tool to be using incorrect
artifacts if the MICROKIT_SDK environment variable is set.

Signed-off-by: Ivan Velickovic <[email protected]>
  • Loading branch information
Ivan-Velickovic committed Oct 29, 2024
1 parent f7a831b commit 2e5c57f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/simple/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ pub fn build(b: *std.Build) void {
b.getInstallPath(.prefix, "./report.txt")
});
microkit_tool_cmd.step.dependOn(b.getInstallStep());
microkit_tool_cmd.setEnvironmentVariable("MICROKIT_SDK", microkit_sdk);
// Add the "microkit" step, and make it the default step when we execute `zig build`
const microkit_step = b.step("microkit", "Compile and build the final bootable image");
microkit_step.dependOn(&microkit_tool_cmd.step);
Expand Down
1 change: 1 addition & 0 deletions examples/zig/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ pub fn build(b: *std.Build) void {
b.getInstallPath(.prefix, "./report.txt")
});
microkit_tool_cmd.step.dependOn(b.getInstallStep());
microkit_tool_cmd.setEnvironmentVariable("MICROKIT_SDK", microkit_sdk);
// Add the "microkit" step, and make it the default step when we execute `zig build`
const microkit_step = b.step("microkit", "Compile and build the final bootable image");
microkit_step.dependOn(&microkit_tool_cmd.step);
Expand Down

0 comments on commit 2e5c57f

Please sign in to comment.