Commit Graph

14 Commits

Author SHA1 Message Date
Mitchell Hashimoto
f3f9af6129 pkg/highway: vendor and modify to remain all libc usage 2026-04-23 20:28:43 -07:00
Mitchell Hashimoto
e51de8b58f libghostty: Remove all libc++ and libc++ ABI dependencies
This updates simdutf to my fork which has a SIMDUTF_NO_LIBCXX option
that removes all libc++ and libc++ ABI dependencies. 

From there, the hand-written simd code we have has been updated to also
no longer use any libc++ features. Part of this required removing utfcpp
since it depended on libc++ (`<iterator>`).

libghostty-vt now only depends on libc.
2026-04-15 10:27:05 -07:00
Mitchell Hashimoto
3e6a65f73f pkg/highway: drop libc++ from vendored hwy
The vendored Highway package was being built with libc++ even though
Ghostty only uses its runtime target selection and dispatch support.
That pulled in extra C++ runtime baggage from upstream support files
such as abort, timer, print, and benchmark helpers.

Build Highway in HWY_NO_LIBCXX mode, only compile the target dispatch
sources we actually need, and compile Ghostty's SIMD translation units
with the same define so the header ABI stays consistent. Replace the
upstream abort implementation with a small local bridge that provides
Highway's Warn/Abort hooks and the target-query shim without depending
on libc++.

This keeps the Highway archive down to the dispatch pieces Ghostty
uses while preserving the existing dynamic dispatch behavior. The
bridge is documented so it is clear why Ghostty carries this small
local replacement.
2026-04-11 14:28:56 -07:00
Mitchell Hashimoto
afa8f059e5 build: skip linkLibCpp on MSVC targets
Zig's bundled libc++/libc++abi conflicts with the MSVC C++ runtime
headers (vcruntime_typeinfo.h, vcruntime_exception.h, etc.) when
targeting native-native-msvc. This caused compilation failures in
the SIMD C++ code due to -nostdinc++ suppressing MSVC headers and
libc++ types clashing with MSVC runtime types.

Skip linkLibCpp() for MSVC targets across all packages (highway,
simdutf, utfcpp) and the main build (SharedDeps, GhosttyZig) since
MSVC provides its own C++ standard library natively. Also add
missing <iterator> and <cstddef> includes that were previously
pulled in transitively through libc++ headers but are not
guaranteed by MSVC's headers.
2026-03-23 11:57:14 -07:00
Mitchell Hashimoto
4e2502c11e simd/codepoint-width: assertions for avx512 padding 2024-02-07 15:23:43 -08:00
Mitchell Hashimoto
e5c7d4e3ee simd: increase padding for avx 2024-02-07 14:43:08 -08:00
Mitchell Hashimoto
ae74117269 simd: use less vector ops for 16-bit 2024-02-07 14:31:06 -08:00
Mitchell Hashimoto
a69d3c7f1c simd/codepoint-width: split by 16-bit 2024-02-07 14:04:48 -08:00
Mitchell Hashimoto
17dc64053e terminal: swap codepointwidth implementations 2024-02-07 09:38:17 -08:00
Mitchell Hashimoto
3c31217f3c simd: minor tweaks 2024-02-07 09:28:56 -08:00
Mitchell Hashimoto
46a887578a simd: remove ziglyph fallback 2024-02-07 09:21:33 -08:00
Mitchell Hashimoto
697fbe21ec simd/codepoint-width: reinclude correct file 2024-02-07 09:18:02 -08:00
Mitchell Hashimoto
d949f1bd84 simd/codepoint-width: match ziglyph 2024-02-07 09:11:02 -08:00
Mitchell Hashimoto
88d81602fa simd/codepoint-width: wip 2024-02-06 22:28:26 -08:00