mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
build: set os_version_min on default target so tests work
This commit is contained in:
14
build.zig
14
build.zig
@ -37,7 +37,17 @@ const app_version = std.SemanticVersion{ .major = 0, .minor = 1, .patch = 0 };
|
|||||||
|
|
||||||
pub fn build(b: *std.Build) !void {
|
pub fn build(b: *std.Build) !void {
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = target: {
|
||||||
|
var result = b.standardTargetOptions(.{});
|
||||||
|
|
||||||
|
// If we have no minimum OS version, we set the default based on
|
||||||
|
// our tag. Not all tags have a minimum so this may be null.
|
||||||
|
if (result.query.os_version_min == null) {
|
||||||
|
result.query.os_version_min = osVersionMin(result.result.os.tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
break :target result;
|
||||||
|
};
|
||||||
|
|
||||||
const wasm_target: WasmTarget = .browser;
|
const wasm_target: WasmTarget = .browser;
|
||||||
|
|
||||||
@ -655,7 +665,7 @@ fn osVersionMin(tag: std.Target.Os.Tag) ?std.Target.Query.OsVersion {
|
|||||||
|
|
||||||
// This should never happen currently. If we add a new target then
|
// This should never happen currently. If we add a new target then
|
||||||
// we should add a new case here.
|
// we should add a new case here.
|
||||||
else => @panic("unhandled os version min os tag"),
|
else => null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user