mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-31 12:49:03 +00:00
build: avoid MSVC C++ runtime in no-libcxx builds
AI-assisted: Codex
This commit is contained in:
committed by
Mitchell Hashimoto
parent
1fe1b2d23c
commit
84254a9d8c
@@ -50,10 +50,16 @@ pub fn build(b: *std.Build) !void {
|
||||
|
||||
if (no_libcxx) {
|
||||
try flags.append(b.allocator, "-DSIMDUTF_NO_LIBCXX");
|
||||
if (target.result.abi != .msvc) {
|
||||
// Clang/GCC-only flags; MSVC doesn't accept these.
|
||||
try flags.append(b.allocator, "-fno-exceptions");
|
||||
try flags.append(b.allocator, "-fno-rtti");
|
||||
try flags.append(b.allocator, "-fno-exceptions");
|
||||
try flags.append(b.allocator, "-fno-rtti");
|
||||
if (target.result.abi == .msvc) {
|
||||
try flags.appendSlice(b.allocator, &.{
|
||||
"-D_USE_STD_VECTOR_ALGORITHMS=0",
|
||||
// -fno-autolink also drops UCRT's /alternatename fallback.
|
||||
"-D_Avx2WmemEnabledWeakValue=_Avx2WmemEnabled",
|
||||
"-fno-autolink",
|
||||
"-fno-stack-protector",
|
||||
});
|
||||
}
|
||||
|
||||
lib.root_module.addCMacro("SIMDUTF_NO_LIBCXX", "1");
|
||||
|
||||
Reference in New Issue
Block a user