aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGravatar Justin Whear <justin.whear@gmail.com> 2023-02-24 12:24:04 -0800
committerGravatar GitHub <noreply@github.com> 2023-02-24 14:24:04 -0600
commitf0e5d5457922a2cbdff954b4dc01c879f8e39b3c (patch)
tree1f6e4a97308a160976f2e00a53ab98f4b903ed98 /build.zig
parent1c531472c93f9d3a7b491b100803b8c0ad42d0e7 (diff)
downloadbun-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.zig6
1 files changed, 1 insertions, 5 deletions
diff --git a/build.zig b/build.zig
index 33e7ad12a..fe8aa6a53 100644
--- a/build.zig
+++ b/build.zig
@@ -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);
}