mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-25 04:02:28 +03:00
LibC+LibRegex: Move regex_defs.h from LibC to LibRegex
This is needed to avoid including LibC headers in Lagom builds.
This commit is contained in:
parent
ec636a404b
commit
7d19abda7a
Notes:
sideshowbarker
2024-07-16 23:08:48 +09:00
Author: https://github.com/implicitfield Commit: https://github.com/SerenityOS/serenity/commit/7d19abda7a Pull-request: https://github.com/SerenityOS/serenity/pull/18522 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/alimpfard
@ -247,14 +247,20 @@ popd
|
||||
# === COPY HEADERS ===
|
||||
|
||||
SRC_ROOT=$($REALPATH "$DIR"/..)
|
||||
FILES=$(find "$SRC_ROOT"/Kernel/API "$SRC_ROOT"/Userland/Libraries/LibC -name '*.h' -print)
|
||||
|
||||
FILES=$(find \
|
||||
"$SRC_ROOT"/Kernel/API \
|
||||
"$SRC_ROOT"/Userland/Libraries/LibC \
|
||||
"$SRC_ROOT"/Userland/Libraries/LibRegex/RegexDefs.h \
|
||||
-name '*.h' -print)
|
||||
for arch in $ARCHS; do
|
||||
mkdir -p "$BUILD/${arch}clang"
|
||||
pushd "$BUILD/${arch}clang"
|
||||
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/|")
|
||||
target=$(echo "$header" | "$SED" \
|
||||
-e "s|$SRC_ROOT/Userland/Libraries/LibC||" \
|
||||
-e "s|$SRC_ROOT/Kernel/|Kernel/|" \
|
||||
-e "s|$SRC_ROOT/Userland/Libraries/LibRegex/|LibRegex/|")
|
||||
buildstep "system_headers" "$INSTALL" -D "$header" "Root/usr/include/$target"
|
||||
done
|
||||
popd
|
||||
|
@ -270,12 +270,14 @@ pushd "$DIR/Build/$ARCH"
|
||||
"$SRC_ROOT"/Kernel/API \
|
||||
"$SRC_ROOT"/Kernel/Arch \
|
||||
"$SRC_ROOT"/Userland/Libraries/LibC \
|
||||
"$SRC_ROOT"/Userland/Libraries/LibRegex/RegexDefs.h \
|
||||
-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/Kernel/|Kernel/|" \
|
||||
-e "s|$SRC_ROOT/Userland/Libraries/LibRegex/|LibRegex/|")
|
||||
buildstep "system_headers" mkdir -p "$(dirname "Root/usr/include/$target")"
|
||||
buildstep "system_headers" $INSTALL "$header" "Root/usr/include/$target"
|
||||
done
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bits/regex_defs.h"
|
||||
#include <LibRegex/RegexDefs.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -6,13 +6,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RegexDefs.h"
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Types.h>
|
||||
#ifdef AK_OS_SERENITY
|
||||
# include <bits/regex_defs.h>
|
||||
#else
|
||||
# include <LibC/bits/regex_defs.h>
|
||||
#endif
|
||||
|
||||
namespace regex {
|
||||
|
||||
|
@ -6,13 +6,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RegexDefs.h"
|
||||
#include <AK/Types.h>
|
||||
#include <stdio.h>
|
||||
#ifdef AK_OS_SERENITY
|
||||
# include <bits/regex_defs.h>
|
||||
#else
|
||||
# include <LibC/bits/regex_defs.h>
|
||||
#endif
|
||||
|
||||
namespace regex {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user