AK: Don't demangle in serenity :(
In order to remove libstdc++ completely, we need to give up on their implementation of abi::__cxa_demangle. The demangler logic will actually have to be quite complex, and included in both the kernel and userspace. A definite fixme for the future, to parse the mangled names into real deal names.
This commit is contained in:
parent
aff594f1e7
commit
4361a50225
Notes:
sideshowbarker
2024-07-19 06:20:28 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/4361a502255 Pull-request: https://github.com/SerenityOS/serenity/pull/2242 Reviewed-by: https://github.com/bugaevc
2 changed files with 4 additions and 3 deletions
|
@ -29,7 +29,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
|
||||
#ifndef BUILDING_SERENITY_TOOLCHAIN
|
||||
#ifndef __serenity__
|
||||
# include <cxxabi.h>
|
||||
#endif
|
||||
|
||||
|
@ -37,9 +37,10 @@ namespace AK {
|
|||
|
||||
inline String demangle(const StringView& name)
|
||||
{
|
||||
#ifdef BUILDING_SERENITY_TOOLCHAIN
|
||||
#ifdef __serenity__
|
||||
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);
|
||||
|
|
|
@ -228,7 +228,7 @@ pushd "$DIR/Build/"
|
|||
echo "XXX serenity libc and libm"
|
||||
mkdir -p "$BUILD"
|
||||
pushd "$BUILD"
|
||||
CXXFLAGS="-DBUILDING_SERENITY_TOOLCHAIN" cmake ..
|
||||
cmake ..
|
||||
"$MAKE" LibC
|
||||
install -D Libraries/LibC/libc.a Libraries/LibM/libm.a Root/usr/lib/
|
||||
SRC_ROOT=$(realpath "$DIR"/..)
|
||||
|
|
Loading…
Add table
Reference in a new issue