Revert "AK: Don't demangle in serenity :("

This reverts commit 4361a50225.
This commit is contained in:
Andreas Kling 2020-05-20 14:23:32 +02:00
parent ef776c1e68
commit 8876bfc3ac
Notes: sideshowbarker 2024-07-19 06:19:09 +09:00
2 changed files with 3 additions and 4 deletions

View File

@ -29,7 +29,7 @@
#include <AK/String.h>
#include <AK/StringView.h>
#ifndef __serenity__
#ifndef BUILDING_SERENITY_TOOLCHAIN
# include <cxxabi.h>
#endif
@ -37,10 +37,9 @@ namespace AK {
inline String demangle(const StringView& name)
{
#ifdef __serenity__
#ifdef BUILDING_SERENITY_TOOLCHAIN
return name;
#else
// FIXME: Implement __cxa_demangle in serenity
int status = 0;
auto* demangled_name = abi::__cxa_demangle(name.to_string().characters(), nullptr, nullptr, &status);
auto string = String(status == 0 ? demangled_name : name);

View File

@ -228,7 +228,7 @@ pushd "$DIR/Build/"
echo "XXX serenity libc and libm"
mkdir -p "$BUILD"
pushd "$BUILD"
cmake ..
CXXFLAGS="-DBUILDING_SERENITY_TOOLCHAIN" cmake ..
"$MAKE" LibC
install -D Libraries/LibC/libc.a Libraries/LibM/libm.a Root/usr/lib/
SRC_ROOT=$(realpath "$DIR"/..)