summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-20 14:23:32 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-20 16:24:26 +0200
commit8876bfc3ac6b395828ab3616cc874971d5c01d6a (patch)
tree933c0d6cab5ff124c5c7a41f10af307ac91b3b00
parentef776c1e681c17075560882381cf2d220d15ba9b (diff)
downloadserenity-8876bfc3ac6b395828ab3616cc874971d5c01d6a.zip
Revert "AK: Don't demangle in serenity :("
This reverts commit 4361a502255e409f04c9325ef73f3cd10f9cafdb.
-rw-r--r--AK/Demangle.h5
-rwxr-xr-xToolchain/BuildIt.sh2
2 files changed, 3 insertions, 4 deletions
diff --git a/AK/Demangle.h b/AK/Demangle.h
index b377556e4b..42dc1cdae4 100644
--- a/AK/Demangle.h
+++ b/AK/Demangle.h
@@ -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);
diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh
index ab499897c4..d55dfd58ae 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"/..)