diff options
author | 2023-02-24 12:24:04 -0800 | |
---|---|---|
committer | 2023-02-24 14:24:04 -0600 | |
commit | f0e5d5457922a2cbdff954b4dc01c879f8e39b3c (patch) | |
tree | 1f6e4a97308a160976f2e00a53ab98f4b903ed98 /build.zig | |
parent | 1c531472c93f9d3a7b491b100803b8c0ad42d0e7 (diff) | |
download | bun-f0e5d5457922a2cbdff954b4dc01c879f8e39b3c.tar.gz bun-f0e5d5457922a2cbdff954b4dc01c879f8e39b3c.tar.zst bun-f0e5d5457922a2cbdff954b4dc01c879f8e39b3c.zip |
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
Diffstat (limited to 'build.zig')
-rw-r--r-- | build.zig | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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); } |