From 26515683335b59804ee2558de97300fed74f3575 Mon Sep 17 00:00:00 2001 From: Mark Delk Date: Sat, 5 Oct 2024 01:09:30 -0500 Subject: [PATCH] bump freetype, strip, ndebug --- build.zig | 9 +++++++-- build/freetype/build.zig | 3 +++ build/freetype/build.zig.zon | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/build.zig b/build.zig index aced00d..9830e71 100644 --- a/build.zig +++ b/build.zig @@ -23,6 +23,7 @@ pub fn build(b: *std.Build) !void { .name = "SDL3", .target = target, .optimize = optimize, + .strip = true, }); { lib.addIncludePath(sdl_dep.path("src")); @@ -37,10 +38,11 @@ pub fn build(b: *std.Build) !void { }); const SDL_ASSERT_LEVEL: u8 = switch (optimize) { - .ReleaseFast, .ReleaseSmall => 1, - .ReleaseSafe, .Debug => 3, // paranoid + .ReleaseFast, .ReleaseSmall, .ReleaseSafe => 0, + .Debug => 3, }; lib.defineCMacro("SDL_ASSERT_LEVEL", b.fmt("{d}", .{SDL_ASSERT_LEVEL})); + lib.defineCMacro("NDEBUG", "1"); lib.linkLibC(); @@ -485,6 +487,7 @@ pub fn build(b: *std.Build) !void { .target = target, .optimize = optimize, .root_source_file = b.addWriteFiles().add("stub.c", ""), + .strip = true, }); { sdl_for_libs.addIncludePath(sdl_dep.path("include")); @@ -496,6 +499,7 @@ pub fn build(b: *std.Build) !void { .name = "SDL3_ttf", .target = target, .optimize = optimize, + .strip = true, }); { SDL_ttf.addCSourceFiles(.{ @@ -561,6 +565,7 @@ pub fn build(b: *std.Build) !void { .target = target, .root_source_file = b.path(b.fmt("src/{s}.zig", .{name})), .optimize = optimize, + .strip = true, }); exe.root_module.addImport("sdl", module); diff --git a/build/freetype/build.zig b/build/freetype/build.zig index ce86ec5..bbd7d53 100644 --- a/build/freetype/build.zig +++ b/build/freetype/build.zig @@ -16,8 +16,11 @@ pub fn build(b: *std.Build) !void { .name = "freetype", .target = target, .optimize = optimize, + .strip = true, }); { + lib.defineCMacro("NDEBUG", "1"); + lib.addCSourceFiles(.{ .root = freetype_dep.path(""), .files = &.{ diff --git a/build/freetype/build.zig.zon b/build/freetype/build.zig.zon index 738da27..e68e1a2 100644 --- a/build/freetype/build.zig.zon +++ b/build/freetype/build.zig.zon @@ -9,8 +9,8 @@ .dependencies = .{ // NOTE: matches SDL_ttf's external/freetype submodule .freetype = .{ - .url = "git+https://github.com/libsdl-org/freetype#12c5e620858bd503731091e9371d06c0a3e7c967", - .hash = "122024689aa770726588625a652c00354ea9b28e2afe1388a87e6854c51374ef2e84", + .url = "git+https://github.com/libsdl-org/freetype#c82745878da1acef2ce6bd7e17a8d59b8612d509", + .hash = "12208f11ed8d8b1a3c25331dcc89c382ca8de704192b469225c9fee58a038953d509", }, }, }