Skip to content

Commit

Permalink
Toolchain: Build demangling into LibC except during toolchain build
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Feb 21, 2020
1 parent 59c052a commit c4c1ad2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions AK/Demangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@

#include <AK/String.h>

#ifndef SERENITY_LIBC_BUILD
#ifndef BUILDING_SERENITY_TOOLCHAIN
#include <cxxabi.h>
#endif

namespace AK {

inline String demangle(const StringView& name)
{
#ifdef SERENITY_LIBC_BUILD
#ifdef BUILDING_SERENITY_TOOLCHAIN
return name;
#else
int status = 0;
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LibC/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ crtn.o: crtin.ao

EXTRA_CLEAN = crt0.d crt0.o

DEFINES = -DSERENITY_LIBC_BUILD
DEFINES = -DSERENITY_LIBC_BUILD $(EXTRA_LIBC_DEFINES)

LIBRARY = libc.a

Expand Down
2 changes: 1 addition & 1 deletion Toolchain/BuildIt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pushd "$DIR/Build/"
"$MAKE" install-gcc install-target-libgcc || exit 1

echo "XXX serenity libc and libm"
( cd "$DIR/../Libraries/LibC/" && "$MAKE" clean && "$MAKE" && "$MAKE" install )
( cd "$DIR/../Libraries/LibC/" && "$MAKE" clean && "$MAKE" EXTRA_LIBC_DEFINES="-DBUILDING_SERENITY_TOOLCHAIN" && "$MAKE" install )
( cd "$DIR/../Libraries/LibM/" && "$MAKE" clean && "$MAKE" && "$MAKE" install )

echo "XXX build libstdc++"
Expand Down

0 comments on commit c4c1ad2

Please sign in to comment.