mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-22 00:51:23 +00:00
build: disable ubsan for SIMD C++ files on MSVC
The SIMD C++ files reference __ubsan_handle_* symbols when compiled in debug mode, but we do not link or bundle the ubsan runtime on MSVC. This matches what the highway and simdutf packages already do in their own build files.
This commit is contained in:
@@ -812,6 +812,14 @@ pub fn addSimd(
|
||||
"-std=c++17",
|
||||
);
|
||||
|
||||
// Disable ubsan for MSVC to avoid undefined references to
|
||||
// __ubsan_handle_* symbols that require a runtime we don't link
|
||||
// and bundle. Hopefully we can fix this one day since ubsan is nice!
|
||||
if (target.result.abi == .msvc) try flags.appendSlice(b.allocator, &.{
|
||||
"-fno-sanitize=undefined",
|
||||
"-fno-sanitize-trap=undefined",
|
||||
});
|
||||
|
||||
m.addCSourceFiles(.{
|
||||
.files = &.{
|
||||
"src/simd/base64.cpp",
|
||||
|
||||
Reference in New Issue
Block a user