mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
build: don't include sentry on windows
This commit is contained in:
@ -1157,9 +1157,11 @@ fn addDeps(
|
|||||||
step.linkLibrary(spirv_cross_dep.artifact("spirv_cross"));
|
step.linkLibrary(spirv_cross_dep.artifact("spirv_cross"));
|
||||||
try static_libs.append(spirv_cross_dep.artifact("spirv_cross").getEmittedBin());
|
try static_libs.append(spirv_cross_dep.artifact("spirv_cross").getEmittedBin());
|
||||||
|
|
||||||
|
if (target.result.os.tag != .windows) {
|
||||||
// Sentry
|
// Sentry
|
||||||
step.linkLibrary(sentry_dep.artifact("sentry"));
|
step.linkLibrary(sentry_dep.artifact("sentry"));
|
||||||
try static_libs.append(sentry_dep.artifact("sentry").getEmittedBin());
|
try static_libs.append(sentry_dep.artifact("sentry").getEmittedBin());
|
||||||
|
}
|
||||||
|
|
||||||
// Dynamic link
|
// Dynamic link
|
||||||
if (!config.static) {
|
if (!config.static) {
|
||||||
|
@ -58,6 +58,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
"src/sentry_windows_dbghelp.c",
|
"src/sentry_windows_dbghelp.c",
|
||||||
"src/path/sentry_path_windows.c",
|
"src/path/sentry_path_windows.c",
|
||||||
"src/symbolizer/sentry_symbolizer_windows.c",
|
"src/symbolizer/sentry_symbolizer_windows.c",
|
||||||
|
"src/unwinder/sentry_unwinder_dbghelp.c",
|
||||||
},
|
},
|
||||||
.flags = flags.items,
|
.flags = flags.items,
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const assert = std.debug.assert;
|
const assert = std.debug.assert;
|
||||||
const Allocator = std.mem.Allocator;
|
const Allocator = std.mem.Allocator;
|
||||||
|
const builtin = @import("builtin");
|
||||||
const build_config = @import("build_config.zig");
|
const build_config = @import("build_config.zig");
|
||||||
const sentry = @import("sentry");
|
const sentry = @import("sentry");
|
||||||
const internal_os = @import("os/main.zig");
|
const internal_os = @import("os/main.zig");
|
||||||
@ -16,6 +17,9 @@ const log = std.log.scoped(.sentry);
|
|||||||
/// It is up to the user to grab the logs and manually send them to us
|
/// It is up to the user to grab the logs and manually send them to us
|
||||||
/// (or they own Sentry instance) if they want to.
|
/// (or they own Sentry instance) if they want to.
|
||||||
pub fn init(gpa: Allocator) !void {
|
pub fn init(gpa: Allocator) !void {
|
||||||
|
// Not supported on Windows currently, doesn't build.
|
||||||
|
if (comptime builtin.os.tag == .windows) return;
|
||||||
|
|
||||||
var arena = std.heap.ArenaAllocator.init(gpa);
|
var arena = std.heap.ArenaAllocator.init(gpa);
|
||||||
defer arena.deinit();
|
defer arena.deinit();
|
||||||
const alloc = arena.allocator();
|
const alloc = arena.allocator();
|
||||||
@ -58,6 +62,8 @@ pub fn init(gpa: Allocator) !void {
|
|||||||
/// Process-wide deinitialization of our Sentry client. This ensures all
|
/// Process-wide deinitialization of our Sentry client. This ensures all
|
||||||
/// our data is flushed.
|
/// our data is flushed.
|
||||||
pub fn deinit() void {
|
pub fn deinit() void {
|
||||||
|
if (comptime builtin.os.tag == .windows) return;
|
||||||
|
|
||||||
_ = sentry.c.sentry_close();
|
_ = sentry.c.sentry_close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user