pkg/{highway,simdutf}: disable ubsan

This causes linker issues for some libghostty users. I don't know why we
never saw these issues with Ghostty release builds, but generally
speaking I think its fine to do this for 3rd party code unless we've
witnessed an issue. And these deps have been stable for a long, long
time.
pull/9696/head
Mitchell Hashimoto 2025-11-24 21:18:48 -08:00
parent 6f0927c42a
commit c92a003325
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
2 changed files with 11 additions and 1 deletions

View File

@ -67,6 +67,10 @@ pub fn build(b: *std.Build) !void {
"-fno-cxx-exceptions",
"-fno-slp-vectorize",
"-fno-vectorize",
// Fixes linker issues for release builds missing ubsanitizer symbols
"-fno-sanitize=undefined",
"-fno-sanitize-trap=undefined",
});
if (target.result.os.tag != .windows) {
try flags.appendSlice(b.allocator, &.{

View File

@ -24,7 +24,13 @@ pub fn build(b: *std.Build) !void {
defer flags.deinit(b.allocator);
// Zig 0.13 bug: https://github.com/ziglang/zig/issues/20414
// (See root Ghostty build.zig on why we do this)
try flags.appendSlice(b.allocator, &.{"-DSIMDUTF_IMPLEMENTATION_ICELAKE=0"});
try flags.appendSlice(b.allocator, &.{
"-DSIMDUTF_IMPLEMENTATION_ICELAKE=0",
// Fixes linker issues for release builds missing ubsanitizer symbols
"-fno-sanitize=undefined",
"-fno-sanitize-trap=undefined",
});
lib.addCSourceFiles(.{
.flags = flags.items,