Merge pull request #23 from birth-software/split-bootstrap
Move bootstrap away from src
This commit is contained in:
commit
956c6ec2d9
13
build.zig
13
build.zig
@ -8,7 +8,7 @@ pub fn build(b: *std.Build) !void {
|
||||
const use_llvm = b.option(bool, "use_llvm", "Use LLVM as the backend for generate the compiler binary") orelse false;
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "nativity",
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
.root_source_file = .{ .path = "bootstrap/main.zig" },
|
||||
.target = target,
|
||||
.optimize = optimization,
|
||||
.use_llvm = use_llvm,
|
||||
@ -24,12 +24,6 @@ pub fn build(b: *std.Build) !void {
|
||||
.install_subdir = "lib",
|
||||
});
|
||||
|
||||
const zig_tests = b.addTest(.{
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
.target = target,
|
||||
.optimize = optimization,
|
||||
});
|
||||
|
||||
const run_command = b.addRunArtifact(exe);
|
||||
|
||||
const debug_command = switch (@import("builtin").os.tag) {
|
||||
@ -58,18 +52,13 @@ pub fn build(b: *std.Build) !void {
|
||||
else => @compileError("OS not supported"),
|
||||
};
|
||||
|
||||
const test_command = b.addRunArtifact(zig_tests);
|
||||
|
||||
if (b.args) |args| {
|
||||
run_command.addArgs(args);
|
||||
test_command.addArgs(args);
|
||||
debug_command.addArgs(args);
|
||||
}
|
||||
|
||||
const run_step = b.step("run", "Test the Nativity compiler");
|
||||
run_step.dependOn(&run_command.step);
|
||||
const test_step = b.step("test", "Test the Nativity compiler");
|
||||
test_step.dependOn(&test_command.step);
|
||||
const debug_step = b.step("debug", "Debug the Nativity compiler");
|
||||
debug_step.dependOn(&debug_command.step);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user