-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.zig
More file actions
22 lines (20 loc) · 747 Bytes
/
build.zig
File metadata and controls
22 lines (20 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const std = @import("std");
const builtin = @import("builtin");
const Builder = std.build.Builder;
const Target = std.build.Target;
pub fn build(b: *Builder) !void {
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("robotstxt", "src/server.zig");
exe.linkSystemLibrary("c");
exe.setBuildMode(mode);
exe.addIncludeDir("src");
exe.strip = true;
exe.single_threaded = true;
exe.setTarget(builtin.arch, builtin.os, try Target.parseAbi("musl"));
//exe.target = Target.parse("x86_64-linux-musl");
//exe.target = Target.parse("x86_64-linux-libc");
b.installArtifact(exe);
const run = b.step("run", "Run the project");
const run_cmd = exe.run();
run.dependOn(&run_cmd.step);
}