[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

@ -243,7 +243,12 @@ if (lz4_ADDED)
endif()
target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads unordered_dense::unordered_dense)
target_link_libraries(common PRIVATE lz4::lz4 LLVM::Demangle zstd::zstd)
target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd)
# Please refer to src/common/demangle.cpp
if (WIN32)
target_link_libraries(common PRIVATE LLVM::Demangle)
endif()
if(ANDROID)
# For ASharedMemory_create