mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-27 01:33:57 +00:00
build: more Zig 0.15.2 updates (#9217)
- update nixpkgs now that Zig 0.15.2 is available in nixpkgs - drop hack that worked around compile failures on systems with more than 32 cores - enforce patch version of Zig
This commit is contained in:
14
build.zig
14
build.zig
@@ -10,10 +10,6 @@ comptime {
|
||||
}
|
||||
|
||||
pub fn build(b: *std.Build) !void {
|
||||
// Works around a Zig but still present in 0.15.1. Remove when fixed.
|
||||
// https://github.com/ghostty-org/ghostty/issues/8924
|
||||
try limitCoresForZigBug();
|
||||
|
||||
// This defines all the available build options (e.g. `-D`). If you
|
||||
// want to know what options are available, you can run `--help` or
|
||||
// you can read `src/build/Config.zig`.
|
||||
@@ -312,13 +308,3 @@ pub fn build(b: *std.Build) !void {
|
||||
try translations_step.addError("cannot update translations when i18n is disabled", .{});
|
||||
}
|
||||
}
|
||||
|
||||
// WARNING: Remove this when https://github.com/ghostty-org/ghostty/issues/8924 is resolved!
|
||||
// Limit ourselves to 32 cpus on Linux because of an upstream Zig bug.
|
||||
fn limitCoresForZigBug() !void {
|
||||
if (comptime builtin.os.tag != .linux) return;
|
||||
const pid = std.os.linux.getpid();
|
||||
var set: std.bit_set.ArrayBitSet(usize, std.os.linux.CPU_SETSIZE * 8) = .initEmpty();
|
||||
for (0..32) |cpu| set.set(cpu);
|
||||
try std.os.linux.sched_setaffinity(pid, &set.masks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user