-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.zig
More file actions
31 lines (27 loc) · 1 KB
/
build.zig
File metadata and controls
31 lines (27 loc) · 1 KB
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
28
29
30
31
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.resolveTargetQuery(.{
.cpu_arch = .x86_64,
.os_tag = .windows,
.abi = .msvc,
});
const optimize = b.standardOptimizeOption(.{ .preferred_optimize_mode = .ReleaseSmall });
// Create a module for our user functions (don't add imports yet)
const user_module = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
// Build the XLL using the framework's helper
// The helper will wire up the xll import for the user module
const xll_build = @import("xll");
const xll = xll_build.buildXll(b, .{
.name = "standalone",
.user_module = user_module,
.target = target,
.optimize = optimize,
});
// Install the XLL (rename .dll to .xll)
const install_xll = b.addInstallFile(xll.getEmittedBin(), "lib/standalone.xll");
b.getInstallStep().dependOn(&install_xll.step);
}