mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Implement os.cpus for Darwin (OS X) (#2115)
* adding experimental Mac implementation os os.cpus * Simplify cpus interfaces * remove support for osx 10 * Refactor os.cpus implementation This commit substantially refactors how the Linux and Darwin implementations of `os.cpus`. The goal is to avoid unnecessary copying and allow broader latitude in responding to errors per implementation. * improved comments * ensure no buffer overrun * use PROCESSOR_CPU_LOAD_INFO_COUNT; not sure if this is correct * oh teh noes * use sliceTo instead of span * cpu_ticks are uints
This commit is contained in:
@@ -170,11 +170,7 @@ pub fn build(b: *Build) !void {
|
||||
|
||||
if (std.mem.eql(u8, os_tagname, "macos")) {
|
||||
os_tagname = "darwin";
|
||||
if (arch.isAARCH64()) {
|
||||
target.os_version_min = std.zig.CrossTarget.OsVersion{ .semver = .{ .major = 11, .minor = 0, .patch = 0 } };
|
||||
} else if (arch.isX86()) {
|
||||
target.os_version_min = std.zig.CrossTarget.OsVersion{ .semver = .{ .major = 10, .minor = 14, .patch = 0 } };
|
||||
}
|
||||
target.os_version_min = std.zig.CrossTarget.OsVersion{ .semver = .{ .major = 11, .minor = 0, .patch = 0 } };
|
||||
} else if (target.isLinux()) {
|
||||
target.setGnuLibCVersion(2, 27, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user