add release build

This commit is contained in:
akiroz 2022-01-27 04:51:00 +08:00
parent 9af7b8abd8
commit 50d9cfe16e
No known key found for this signature in database
GPG Key ID: 8A5957C4A2F68ACC
2 changed files with 7 additions and 4 deletions

View File

@ -30,6 +30,6 @@ Custom firmware USB device: 1CCF:2333
``` ```
$ git clone ... $ git clone ...
$ zig build $ zig build -Drelease-fast=true
$ ls zig-out/lib/chuniio_tasoller.dll $ ls zig-out/lib/chuniio_tasoller.dll
``` ```

View File

@ -3,10 +3,13 @@ const CrossTarget = std.zig.CrossTarget;
pub fn build(b: *std.build.Builder) void { pub fn build(b: *std.build.Builder) void {
const target = CrossTarget{ .os_tag = .windows, .cpu_arch = .i386, .abi = .msvc }; const target = CrossTarget{ .os_tag = .windows, .cpu_arch = .i386, .abi = .msvc };
const lib = b.addSharedLibrary("chuniio_tasoller", "src/main.zig", .unversioned); const lib = b.addSharedLibrary("chuniio_tasoller", "src/main.zig", .unversioned);
lib.setBuildMode(b.standardReleaseOptions());
lib.setTarget(target); lib.setTarget(target);
lib.install(); lib.install();
const exe = b.addExecutable("tasoller_test", "src/main.zig");
exe.setTarget(target); // const exe = b.addExecutable("tasoller_test", "src/main.zig");
exe.install(); // exe.setTarget(target);
// exe.install();
} }