build: make FSEvents backend optional and link it against xcode-frameworks

This commit is contained in:
CJ van den Berg 2026-02-26 13:49:01 +01:00
parent a720697618
commit f326b73457
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 26 additions and 1 deletions

View file

@ -1,5 +1,6 @@
const std = @import("std");
const builtin = @import("builtin");
const build_options = @import("build_options");
pub const EventType = enum {
created,
@ -80,7 +81,7 @@ pub fn handle_read_ready(self: *@This()) !void {
const Backend = switch (builtin.os.tag) {
.linux => INotifyBackend,
.macos => FSEventsBackend,
.macos => if (build_options.use_fsevents) FSEventsBackend else KQueueBackend,
.freebsd => KQueueBackend,
.windows => WindowsBackend,
else => @compileError("file_watcher: unsupported OS"),