build: replace App.setBuildMode() with mode option
This commit is contained in:
parent
b94bc1fd47
commit
c4842ea5c5
1 changed files with 3 additions and 5 deletions
|
|
@ -97,9 +97,9 @@ pub fn build(b: *Builder) !void {
|
||||||
.name = "shaderexp",
|
.name = "shaderexp",
|
||||||
.src = "shaderexp/main.zig",
|
.src = "shaderexp/main.zig",
|
||||||
.target = target,
|
.target = target,
|
||||||
|
.mode = mode,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
shaderexp_app.setBuildMode(mode);
|
|
||||||
try shaderexp_app.link(options);
|
try shaderexp_app.link(options);
|
||||||
shaderexp_app.install();
|
shaderexp_app.install();
|
||||||
|
|
||||||
|
|
@ -193,6 +193,7 @@ pub const App = struct {
|
||||||
name: []const u8,
|
name: []const u8,
|
||||||
src: []const u8,
|
src: []const u8,
|
||||||
target: CrossTarget,
|
target: CrossTarget,
|
||||||
|
mode: std.builtin.Mode,
|
||||||
deps: ?[]const Pkg = null,
|
deps: ?[]const Pkg = null,
|
||||||
res_dirs: ?[]const []const u8 = null,
|
res_dirs: ?[]const []const u8 = null,
|
||||||
watch_paths: ?[]const []const u8 = null,
|
watch_paths: ?[]const []const u8 = null,
|
||||||
|
|
@ -247,6 +248,7 @@ pub const App = struct {
|
||||||
step.main_pkg_path = sdkPath("/src");
|
step.main_pkg_path = sdkPath("/src");
|
||||||
step.addPackage(app_pkg);
|
step.addPackage(app_pkg);
|
||||||
step.setTarget(options.target);
|
step.setTarget(options.target);
|
||||||
|
step.setBuildMode(options.mode);
|
||||||
|
|
||||||
return .{
|
return .{
|
||||||
.b = b,
|
.b = b,
|
||||||
|
|
@ -339,10 +341,6 @@ pub const App = struct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn setBuildMode(app: *const App, mode: std.builtin.Mode) void {
|
|
||||||
app.step.setBuildMode(mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn getInstallStep(app: *const App) ?*std.build.InstallArtifactStep {
|
pub fn getInstallStep(app: *const App) ?*std.build.InstallArtifactStep {
|
||||||
return app.step.install_step;
|
return app.step.install_step;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue