浏览代码

Everywhere: Fully remove the separate LibM directory

Tim Schumacher 2 年之前
父节点
当前提交
1b25c38b8b

+ 0 - 1
CMakeLists.txt

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

+ 0 - 1
Documentation/QtCreatorConfiguration.md

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

+ 0 - 2
Documentation/VSCodeConfiguration.md

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

+ 2 - 2
Toolchain/BuildClang.sh

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

+ 1 - 3
Toolchain/BuildIt.sh

@@ -363,7 +363,7 @@ pushd "$DIR/Build/$ARCH"
         buildstep "binutils/install" "$MAKE" install || exit 1
     popd
 
-    echo "XXX serenity libc and libm headers"
+    echo "XXX serenity libc headers"
     mkdir -p "$BUILD"
     pushd "$BUILD"
         mkdir -p Root/usr/include/
@@ -373,13 +373,11 @@ pushd "$DIR/Build/$ARCH"
             "$SRC_ROOT"/Kernel/API \
             "$SRC_ROOT"/Kernel/Arch \
             "$SRC_ROOT"/Userland/Libraries/LibC \
-            "$SRC_ROOT"/Userland/Libraries/LibM \
             -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/Userland/Libraries/LibM@@" \
                 -e "s@$SRC_ROOT/Kernel/@Kernel/@")
             buildstep "system_headers" $INSTALL -D "$header" "Root/usr/include/$target"
         done

+ 0 - 1
Userland/Libraries/CMakeLists.txt

@@ -33,7 +33,6 @@ add_subdirectory(LibJS)
 add_subdirectory(LibKeyboard)
 add_subdirectory(LibLine)
 add_subdirectory(LibLocale)
-add_subdirectory(LibM)
 add_subdirectory(LibMain)
 add_subdirectory(LibMarkdown)
 add_subdirectory(LibPartition)

+ 5 - 0
Userland/Libraries/LibC/CMakeLists.txt

@@ -184,3 +184,8 @@ add_dependencies(LibC LibM LibSystem LibCStatic)
 # Provide a linker script instead of various other libraries that tells everything to link against LibC.
 file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libpthread.so" "INPUT(libc.so)")
 file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libdl.so" "INPUT(libc.so)")
+
+# Provide a dummy target and a linker script for LibM that tells everything to link against LibC instead.
+add_library(LibM INTERFACE)
+target_link_libraries(LibM INTERFACE LibC)
+file(WRITE "${CMAKE_STAGING_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libm.so" "INPUT(libc.so)")

+ 0 - 4
Userland/Libraries/LibM/CMakeLists.txt

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