mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
build: disable bundled ubsan runtime on Windows
Zig's ubsan runtime emits /exclude-symbols linker directives that are incompatible with the MSVC linker, causing LNK4229 warnings and LNK1143 errors. Disable bundling ubsan_rt on Windows while keeping compiler_rt which provides essential symbols like memcpy, memset, memmove, and ___chkstk_ms. The previous check used target.result.abi == .msvc which never matched because Zig defaults to the gnu ABI on Windows.
This commit is contained in:
@@ -107,12 +107,8 @@ fn initLib(
|
||||
}
|
||||
|
||||
if (target.result.os.tag == .windows) {
|
||||
// Zig's ubsan emits /exclude-symbols linker directives and
|
||||
// its compiler_rt produces COMDAT sections that are
|
||||
// incompatible with the MSVC linker (LNK1143, LNK4229).
|
||||
// Skip bundling these runtimes on Windows since consumers
|
||||
// link against the MSVC runtime.
|
||||
lib.bundle_compiler_rt = false;
|
||||
// Zig's ubsan emits /exclude-symbols linker directives that
|
||||
// are incompatible with the MSVC linker (LNK4229).
|
||||
lib.bundle_ubsan_rt = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user