mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 08:11:13 +00:00
Meta: Remove empty LibSystem library and references
This commit is contained in:
parent
f5ed7d5d9c
commit
126cbce632
Notes:
sideshowbarker
2024-07-17 03:27:40 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/126cbce632 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/35
|
@ -28,7 +28,6 @@ First, make sure you have a working toolchain and can build and run SerenityOS.
|
||||||
./
|
./
|
||||||
Userland/
|
Userland/
|
||||||
Userland/Libraries/
|
Userland/Libraries/
|
||||||
Userland/Libraries/LibSystem/
|
|
||||||
Userland/Services/
|
Userland/Services/
|
||||||
Toolchain/Local/x86_64/x86_64-pc-serenity/include/c++/13.1.0
|
Toolchain/Local/x86_64/x86_64-pc-serenity/include/c++/13.1.0
|
||||||
Build/x86_64/
|
Build/x86_64/
|
||||||
|
|
|
@ -327,18 +327,12 @@ add_lagom_library_install_rules(JSClangPlugin)
|
||||||
# Create mostly empty targets for system libraries we don't need to build for Lagom
|
# Create mostly empty targets for system libraries we don't need to build for Lagom
|
||||||
add_library(LibC INTERFACE)
|
add_library(LibC INTERFACE)
|
||||||
add_library(LibCrypt INTERFACE)
|
add_library(LibCrypt INTERFACE)
|
||||||
add_library(LibSystem INTERFACE)
|
|
||||||
if (NOT APPLE AND NOT ANDROID AND NOT EMSCRIPTEN AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" AND NOT HAIKU)
|
if (NOT APPLE AND NOT ANDROID AND NOT EMSCRIPTEN AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" AND NOT HAIKU)
|
||||||
target_link_libraries(LibCrypt INTERFACE crypt) # LibCore::Account uses crypt() but it's not in libcrypt on macOS
|
target_link_libraries(LibCrypt INTERFACE crypt) # LibCore::Account uses crypt() but it's not in libcrypt on macOS
|
||||||
endif()
|
endif()
|
||||||
if (SERENITYOS)
|
|
||||||
# Serenity only allows syscalls from LibSystem, so if someone asks for that on Lagom,
|
|
||||||
# we need to pass that through to the system's LibSystem.
|
|
||||||
target_link_libraries(LibSystem INTERFACE system)
|
|
||||||
endif()
|
|
||||||
add_library(NoCoverage INTERFACE)
|
add_library(NoCoverage INTERFACE)
|
||||||
# "install" these special targets to placate CMake
|
# "install" these special targets to placate CMake
|
||||||
install(TARGETS LibC LibCrypt LibSystem NoCoverage EXPORT LagomTargets)
|
install(TARGETS LibC LibCrypt NoCoverage EXPORT LagomTargets)
|
||||||
|
|
||||||
# AK
|
# AK
|
||||||
add_serenity_subdirectory(AK)
|
add_serenity_subdirectory(AK)
|
||||||
|
|
|
@ -31,10 +31,7 @@ shared_library("minimal") {
|
||||||
"Version.h",
|
"Version.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [ "//AK" ]
|
||||||
"//AK",
|
|
||||||
"//Userland/Libraries/LibSystem",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
source_set("sources") {
|
source_set("sources") {
|
||||||
|
@ -170,7 +167,6 @@ shared_library("LibCore") {
|
||||||
":sources",
|
":sources",
|
||||||
"//Meta/gn/build/libs/crypt",
|
"//Meta/gn/build/libs/crypt",
|
||||||
"//Meta/gn/build/libs/pthread",
|
"//Meta/gn/build/libs/pthread",
|
||||||
"//Userland/Libraries/LibSystem",
|
|
||||||
"//Userland/Libraries/LibTimeZone",
|
"//Userland/Libraries/LibTimeZone",
|
||||||
"//Userland/Libraries/LibURL",
|
"//Userland/Libraries/LibURL",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
group("LibSystem") {
|
|
||||||
deps = []
|
|
||||||
}
|
|
|
@ -29,7 +29,6 @@ add_subdirectory(LibRIFF)
|
||||||
add_subdirectory(LibSanitizer)
|
add_subdirectory(LibSanitizer)
|
||||||
add_subdirectory(LibSQL)
|
add_subdirectory(LibSQL)
|
||||||
add_subdirectory(LibSyntax)
|
add_subdirectory(LibSyntax)
|
||||||
add_subdirectory(LibSystem)
|
|
||||||
add_subdirectory(LibTest)
|
add_subdirectory(LibTest)
|
||||||
add_subdirectory(LibTextCodec)
|
add_subdirectory(LibTextCodec)
|
||||||
add_subdirectory(LibThreading)
|
add_subdirectory(LibThreading)
|
||||||
|
|
|
@ -15,10 +15,9 @@ set(SOURCES
|
||||||
)
|
)
|
||||||
|
|
||||||
serenity_lib(LibCoreMinimal coreminimal)
|
serenity_lib(LibCoreMinimal coreminimal)
|
||||||
target_link_libraries(LibCoreMinimal PRIVATE LibSystem)
|
|
||||||
|
|
||||||
if (SERENITYOS)
|
if (SERENITYOS)
|
||||||
add_library(DynamicLoader_LibCoreArgsParser
|
add_library(DynamicLoader_LibCoreArgsParser
|
||||||
ArgsParser.cpp
|
ArgsParser.cpp
|
||||||
Version.cpp)
|
Version.cpp)
|
||||||
target_link_libraries(DynamicLoader_LibCoreArgsParser PUBLIC DynamicLoader_CompileOptions)
|
target_link_libraries(DynamicLoader_LibCoreArgsParser PUBLIC DynamicLoader_CompileOptions)
|
||||||
|
@ -93,7 +92,7 @@ if (APPLE OR CMAKE_SYSTEM_NAME STREQUAL "GNU")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
serenity_lib(LibCore core)
|
serenity_lib(LibCore core)
|
||||||
target_link_libraries(LibCore PRIVATE LibCrypt LibSystem LibTimeZone LibURL)
|
target_link_libraries(LibCore PRIVATE LibCrypt LibTimeZone LibURL)
|
||||||
target_link_libraries(LibCore PUBLIC LibCoreMinimal)
|
target_link_libraries(LibCore PUBLIC LibCoreMinimal)
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|
|
@ -8,23 +8,11 @@
|
||||||
#include <LibCore/SessionManagement.h>
|
#include <LibCore/SessionManagement.h>
|
||||||
#include <LibCore/System.h>
|
#include <LibCore/System.h>
|
||||||
|
|
||||||
#ifdef AK_OS_SERENITY
|
|
||||||
# include <LibSystem/syscall.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Core::SessionManagement {
|
namespace Core::SessionManagement {
|
||||||
|
|
||||||
ErrorOr<pid_t> root_session_id([[maybe_unused]] Optional<pid_t> force_sid)
|
ErrorOr<pid_t> root_session_id([[maybe_unused]] Optional<pid_t> force_sid)
|
||||||
{
|
{
|
||||||
#ifdef AK_OS_SERENITY
|
|
||||||
int rc = syscall(SC_get_root_session_id, force_sid.value_or(-1));
|
|
||||||
if (rc < 0) {
|
|
||||||
return Error::from_syscall("get_root_session_id"sv, rc);
|
|
||||||
}
|
|
||||||
return static_cast<pid_t>(rc);
|
|
||||||
#else
|
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorOr<void> logout(Optional<pid_t> force_sid)
|
ErrorOr<void> logout(Optional<pid_t> force_sid)
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#ifdef AK_OS_SERENITY
|
#ifdef AK_OS_SERENITY
|
||||||
# include <Kernel/API/Unveil.h>
|
# include <Kernel/API/Unveil.h>
|
||||||
# include <LibCore/Account.h>
|
# include <LibCore/Account.h>
|
||||||
# include <LibSystem/syscall.h>
|
|
||||||
# include <serenity.h>
|
# include <serenity.h>
|
||||||
# include <sys/ptrace.h>
|
# include <sys/ptrace.h>
|
||||||
# include <sys/sysmacros.h>
|
# include <sys/sysmacros.h>
|
||||||
|
|
Loading…
Reference in a new issue