Everywhere: Fully remove the separate LibPthread directory

This commit is contained in:
Tim Schumacher 2022-07-15 15:51:00 +02:00 committed by Linus Groh
parent dac361e330
commit 28061cf94d
Notes: sideshowbarker 2024-07-17 08:47:56 +09:00
9 changed files with 10 additions and 16 deletions

View file

@ -186,7 +186,6 @@ include_directories(Userland/Libraries)
include_directories(Userland/Libraries/LibC)
include_directories(Userland/Libraries/LibCrypt)
include_directories(Userland/Libraries/LibM)
include_directories(Userland/Libraries/LibPthread)
include_directories(Userland/Libraries/LibSystem)
include_directories(Userland/Services)
include_directories(Userland)

View file

@ -24,7 +24,6 @@ Userland/Services/
Userland/Libraries/
Userland/Libraries/LibC/
Userland/Libraries/LibM/
Userland/Libraries/LibPthread/
Userland/Libraries/LibSystem/
Toolchain/Local/i686/i686-pc-serenity/include/c++/12.1.0
Build/i686/

View file

@ -46,7 +46,6 @@ These extensions can be used as-is, but you need to point them to the custom Ser
"${workspaceFolder}/Userland/Libraries",
"${workspaceFolder}/Userland/Libraries/LibC",
"${workspaceFolder}/Userland/Libraries/LibM",
"${workspaceFolder}/Userland/Libraries/LibPthread",
"${workspaceFolder}/Userland/Services",
"${workspaceFolder}/Toolchain/Local/i686/i686-pc-serenity/include/c++/**"
],
@ -77,7 +76,6 @@ These extensions can be used as-is, but you need to point them to the custom Ser
"${workspaceFolder}/Userland/Libraries",
"${workspaceFolder}/Userland/Libraries/LibC",
"${workspaceFolder}/Userland/Libraries/LibM",
"${workspaceFolder}/Userland/Libraries/LibPthread",
"${workspaceFolder}/Userland/Services",
"${workspaceFolder}/Toolchain/Local/i686/i686-pc-serenity/include/c++/**"
],

View file

@ -19,13 +19,13 @@ steps:
- ${{ if eq(parameters.toolchain, 'clang') }}:
- task: Cache@2
inputs:
key: '"toolchain" | "x86_64" | Toolchain/BuildClang.sh | Toolchain/Patches/llvm/*.patch | Toolchain/CMake/*.cmake | Userland/Libraries/LibC/**/*.h | Userland/Libraries/LibPthread/**/*.h'
key: '"toolchain" | "x86_64" | Toolchain/BuildClang.sh | Toolchain/Patches/llvm/*.patch | Toolchain/CMake/*.cmake | Userland/Libraries/LibC/**/*.h'
path: $(Build.SourcesDirectory)/Toolchain/Cache
displayName: 'Toolchain Prebuilt Cache'
- ${{ if eq(parameters.toolchain, 'gcc') }}:
- task: Cache@2
inputs:
key: '"toolchain" | "${{ parameters.arch }}" | Toolchain/BuildIt.sh | Toolchain/Patches/binutils.patch | Toolchain/Patches/gcc/*.patch | Userland/Libraries/LibC/**/*.h | Userland/Libraries/LibPthread/**/*.h'
key: '"toolchain" | "${{ parameters.arch }}" | Toolchain/BuildIt.sh | Toolchain/Patches/binutils.patch | Toolchain/Patches/gcc/*.patch | Userland/Libraries/LibC/**/*.h'
path: $(Build.SourcesDirectory)/Toolchain/Cache
displayName: 'Toolchain Prebuilt Cache'

View file

@ -248,14 +248,14 @@ popd
# === COPY HEADERS ===
SRC_ROOT=$($REALPATH "$DIR"/..)
FILES=$(find "$SRC_ROOT"/Kernel/API "$SRC_ROOT"/Userland/Libraries/LibC "$SRC_ROOT"/Userland/Libraries/LibM "$SRC_ROOT"/Userland/Libraries/LibPthread "$SRC_ROOT"/Userland/Libraries/LibDl -name '*.h' -print)
FILES=$(find "$SRC_ROOT"/Kernel/API "$SRC_ROOT"/Userland/Libraries/LibC "$SRC_ROOT"/Userland/Libraries/LibM "$SRC_ROOT"/Userland/Libraries/LibDl -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/Userland/Libraries/LibM@@" -e "s@$SRC_ROOT/Userland/Libraries/LibPthread@@" -e "s@$SRC_ROOT/Userland/Libraries/LibDl@@" -e "s@$SRC_ROOT/Kernel/@Kernel/@")
target=$(echo "$header" | "$SED" -e "s@$SRC_ROOT/Userland/Libraries/LibC@@" -e "s@$SRC_ROOT/Userland/Libraries/LibM@@" -e "s@$SRC_ROOT/Userland/Libraries/LibDl@@" -e "s@$SRC_ROOT/Kernel/@Kernel/@")
buildstep "system_headers" "$INSTALL" -D "$header" "Root/usr/include/$target"
done
popd

View file

@ -363,7 +363,7 @@ pushd "$DIR/Build/$ARCH"
buildstep "binutils/install" "$MAKE" install || exit 1
popd
echo "XXX serenity libc, libdl, libm and libpthread headers"
echo "XXX serenity libc, libdl and libm headers"
mkdir -p "$BUILD"
pushd "$BUILD"
mkdir -p Root/usr/include/
@ -375,7 +375,6 @@ pushd "$DIR/Build/$ARCH"
"$SRC_ROOT"/Userland/Libraries/LibC \
"$SRC_ROOT"/Userland/Libraries/LibDl \
"$SRC_ROOT"/Userland/Libraries/LibM \
"$SRC_ROOT"/Userland/Libraries/LibPthread \
-name '*.h' -print)
for header in $FILES; do
target=$(echo "$header" | sed \
@ -383,7 +382,6 @@ pushd "$DIR/Build/$ARCH"
-e "s@$SRC_ROOT/Userland/Libraries/LibC@@" \
-e "s@$SRC_ROOT/Userland/Libraries/LibDl@@" \
-e "s@$SRC_ROOT/Userland/Libraries/LibM@@" \
-e "s@$SRC_ROOT/Userland/Libraries/LibPthread@@" \
-e "s@$SRC_ROOT/Kernel/@Kernel/@")
buildstep "system_headers" $INSTALL -D "$header" "Root/usr/include/$target"
done

View file

@ -39,7 +39,6 @@ add_subdirectory(LibMarkdown)
add_subdirectory(LibPCIDB)
add_subdirectory(LibPDF)
add_subdirectory(LibProtocol)
add_subdirectory(LibPthread)
add_subdirectory(LibRegex)
add_subdirectory(LibSanitizer)
add_subdirectory(LibSoftGPU)

View file

@ -179,3 +179,8 @@ target_link_libraries(LibC ssp system LibTimeZone)
# We mark LibCStatic as a dependency of LibC because this triggers the build of the LibCStatic target
add_dependencies(LibC LibM LibSystem LibCStatic)
# Provide a dummy target and a linker script for LibPthread that tells everything to link against LibC instead.
add_library(LibPthread INTERFACE)
target_link_libraries(LibPthread INTERFACE LibC)
file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libpthread.so" "INPUT(libc.so)")

View file

@ -1,4 +0,0 @@
# Provide a dummy target and a linker script that tells everything to link against LibC instead.
add_library(LibPthread INTERFACE)
target_link_libraries(LibPthread INTERFACE LibC)
file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libpthread.so" "INPUT(libc.so)")