Toolchain: Copy the same headers as GNU when building Clang

We were previously missing `Kernel/Arch`, which gets included by
`Kernel/API`.

While at it, remove `AK` from the list of copied headers for the
toolchain, as nothing in our LibC headers should ever publicly depend on
AK.
This commit is contained in:
Tim Schumacher 2023-07-15 18:09:28 +02:00 committed by Andrew Kaster
parent 4b0ef6b81d
commit 9410f0a96c
Notes: sideshowbarker 2024-07-17 02:39:10 +09:00
2 changed files with 2 additions and 3 deletions

View file

@ -249,6 +249,7 @@ popd
SRC_ROOT=$($REALPATH "$DIR"/..)
FILES=$(find \
"$SRC_ROOT"/Kernel/API \
"$SRC_ROOT"/Kernel/Arch \
"$SRC_ROOT"/Userland/Libraries/LibC \
"$SRC_ROOT"/Userland/Libraries/LibELF/ELFABI.h \
"$SRC_ROOT"/Userland/Libraries/LibRegex/RegexDefs.h \
@ -259,8 +260,8 @@ for arch in $ARCHS; do
mkdir -p Root/usr/include/
for header in $FILES; do
target=$(echo "$header" | "$SED" \
-e "s|$SRC_ROOT/Userland/Libraries/LibC||" \
-e "s|$SRC_ROOT/Kernel/|Kernel/|" \
-e "s|$SRC_ROOT/Userland/Libraries/LibC||" \
-e "s|$SRC_ROOT/Userland/Libraries/LibELF/|LibELF/|" \
-e "s|$SRC_ROOT/Userland/Libraries/LibRegex/|LibRegex/|")
buildstep "system_headers" "$INSTALL" -D "$header" "Root/usr/include/$target"

View file

@ -266,7 +266,6 @@ pushd "$DIR/Build/$ARCH"
mkdir -p Root/usr/include/
SRC_ROOT=$($REALPATH "$DIR"/..)
FILES=$(find \
"$SRC_ROOT"/AK \
"$SRC_ROOT"/Kernel/API \
"$SRC_ROOT"/Kernel/Arch \
"$SRC_ROOT"/Userland/Libraries/LibC \
@ -275,7 +274,6 @@ pushd "$DIR/Build/$ARCH"
-name '*.h' -print)
for header in $FILES; do
target=$(echo "$header" | sed \
-e "s|$SRC_ROOT/AK/|AK/|" \
-e "s|$SRC_ROOT/Userland/Libraries/LibC||" \
-e "s|$SRC_ROOT/Kernel/|Kernel/|" \
-e "s|$SRC_ROOT/Userland/Libraries/LibELF/|LibELF/|" \