From 8876bfc3ac6b395828ab3616cc874971d5c01d6a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 20 May 2020 14:23:32 +0200 Subject: [PATCH] Revert "AK: Don't demangle in serenity :(" This reverts commit 4361a502255e409f04c9325ef73f3cd10f9cafdb. --- AK/Demangle.h | 5 ++--- Toolchain/BuildIt.sh | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/AK/Demangle.h b/AK/Demangle.h index b377556e4bc..42dc1cdae4a 100644 --- a/AK/Demangle.h +++ b/AK/Demangle.h @@ -29,7 +29,7 @@ #include #include -#ifndef __serenity__ +#ifndef BUILDING_SERENITY_TOOLCHAIN # include #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); diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index ab499897c42..d55dfd58aed 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -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"/..)