mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +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
8 changed files with 4 additions and 33 deletions
|
@ -28,7 +28,6 @@ First, make sure you have a working toolchain and can build and run SerenityOS.
|
|||
./
|
||||
Userland/
|
||||
Userland/Libraries/
|
||||
Userland/Libraries/LibSystem/
|
||||
Userland/Services/
|
||||
Toolchain/Local/x86_64/x86_64-pc-serenity/include/c++/13.1.0
|
||||
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
|
||||
add_library(LibC 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)
|
||||
target_link_libraries(LibCrypt INTERFACE crypt) # LibCore::Account uses crypt() but it's not in libcrypt on macOS
|
||||
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)
|
||||
# "install" these special targets to placate CMake
|
||||
install(TARGETS LibC LibCrypt LibSystem NoCoverage EXPORT LagomTargets)
|
||||
install(TARGETS LibC LibCrypt NoCoverage EXPORT LagomTargets)
|
||||
|
||||
# AK
|
||||
add_serenity_subdirectory(AK)
|
||||
|
|
|
@ -31,10 +31,7 @@ shared_library("minimal") {
|
|||
"Version.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//AK",
|
||||
"//Userland/Libraries/LibSystem",
|
||||
]
|
||||
deps = [ "//AK" ]
|
||||
}
|
||||
|
||||
source_set("sources") {
|
||||
|
@ -170,7 +167,6 @@ shared_library("LibCore") {
|
|||
":sources",
|
||||
"//Meta/gn/build/libs/crypt",
|
||||
"//Meta/gn/build/libs/pthread",
|
||||
"//Userland/Libraries/LibSystem",
|
||||
"//Userland/Libraries/LibTimeZone",
|
||||
"//Userland/Libraries/LibURL",
|
||||
]
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
group("LibSystem") {
|
||||
deps = []
|
||||
}
|
|
@ -29,7 +29,6 @@ add_subdirectory(LibRIFF)
|
|||
add_subdirectory(LibSanitizer)
|
||||
add_subdirectory(LibSQL)
|
||||
add_subdirectory(LibSyntax)
|
||||
add_subdirectory(LibSystem)
|
||||
add_subdirectory(LibTest)
|
||||
add_subdirectory(LibTextCodec)
|
||||
add_subdirectory(LibThreading)
|
||||
|
|
|
@ -15,10 +15,9 @@ set(SOURCES
|
|||
)
|
||||
|
||||
serenity_lib(LibCoreMinimal coreminimal)
|
||||
target_link_libraries(LibCoreMinimal PRIVATE LibSystem)
|
||||
|
||||
if (SERENITYOS)
|
||||
add_library(DynamicLoader_LibCoreArgsParser
|
||||
add_library(DynamicLoader_LibCoreArgsParser
|
||||
ArgsParser.cpp
|
||||
Version.cpp)
|
||||
target_link_libraries(DynamicLoader_LibCoreArgsParser PUBLIC DynamicLoader_CompileOptions)
|
||||
|
@ -93,7 +92,7 @@ if (APPLE OR CMAKE_SYSTEM_NAME STREQUAL "GNU")
|
|||
endif()
|
||||
|
||||
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)
|
||||
|
||||
if (APPLE)
|
||||
|
|
|
@ -8,23 +8,11 @@
|
|||
#include <LibCore/SessionManagement.h>
|
||||
#include <LibCore/System.h>
|
||||
|
||||
#ifdef AK_OS_SERENITY
|
||||
# include <LibSystem/syscall.h>
|
||||
#endif
|
||||
|
||||
namespace Core::SessionManagement {
|
||||
|
||||
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;
|
||||
#endif
|
||||
}
|
||||
|
||||
ErrorOr<void> logout(Optional<pid_t> force_sid)
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#ifdef AK_OS_SERENITY
|
||||
# include <Kernel/API/Unveil.h>
|
||||
# include <LibCore/Account.h>
|
||||
# include <LibSystem/syscall.h>
|
||||
# include <serenity.h>
|
||||
# include <sys/ptrace.h>
|
||||
# include <sys/sysmacros.h>
|
||||
|
|
Loading…
Reference in a new issue