blob: d90a774902382c87ab6ac0164ad1edffd217a7c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.resolveTargetQuery(.{
.cpu_arch = .x86_64,
.os_tag = .freestanding,
.abi = .none,
});
const mirai_module = b.createModule(.{
.root_source_file = b.path("mirai/mirai.zig"),
.target = target,
.optimize = .ReleaseSmall,
.code_model = .kernel,
});
const kernel = b.addExecutable(.{
.name = "mirai.kernel",
.root_module = mirai_module,
});
kernel.addAssemblyFile(b.path("boot/boot.s"));
kernel.addAssemblyFile(b.path("boot/boot64.s"));
kernel.setLinkerScript(b.path("linker/mirai.linker"));
b.installArtifact(kernel);
}
|