[common] use abi::__cxa_demangle for demangling using the system's glibcxx/libc++ (#3894)

most stdlibc++ already provide this functionality out of the box, very consistently and well implemented (usually)

my main irk is that the llvm itanium demangle is totally unescesary when there is a perfectly stable, tested and well documented equivalent functionality in the standard stdc++ provided in most UNIX oses

its mostly to reduce binary size by a very thin margin, but he stdc++ is more than capable of doing he same behaviour we use a dpeendency for

for mingw or such howeger,, demangling becomies trickier so we have to exclude windows entirely because well windows likes to do things differently dont they

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3894
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
lizzie 2026-06-03 22:53:09 +02:00 committed by crueter
parent ec2b9b0400
commit f729dbb3c3
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
5 changed files with 44 additions and 18 deletions

View file

@ -49,8 +49,8 @@ if (NOT TARGET stb::headers)
add_library(stb::headers ALIAS stb)
endif()
# ItaniumDemangle
if (NOT TARGET LLVM::Demangle)
# ItaniumDemangle (Windows only)
if (WIN32 AND NOT TARGET LLVM::Demangle)
add_library(demangle demangle/ItaniumDemangle.cpp)
target_include_directories(demangle PUBLIC ./demangle)
if (NOT MSVC)