summaryrefslogtreecommitdiff
path: root/Meta/Lagom
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-10-23 22:05:33 +0000
committerLinus Groh <mail@linusgroh.de>2022-10-24 15:52:42 +0200
commit7ecc50db5747a5a8000e17315a9c433a71597c8f (patch)
treeee091d84fe7ec678fb961021e990ba48f6adab0b /Meta/Lagom
parent8cc952b3dc60fd5587e594b085e83b77f7b9de64 (diff)
downloadserenity-7ecc50db5747a5a8000e17315a9c433a71597c8f.zip
Lagom: Link the system's LibSystem on SerenityOS
Diffstat (limited to 'Meta/Lagom')
-rw-r--r--Meta/Lagom/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt
index 6939c03ac6..c30063374d 100644
--- a/Meta/Lagom/CMakeLists.txt
+++ b/Meta/Lagom/CMakeLists.txt
@@ -289,12 +289,18 @@ endif()
# 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 ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
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 NoCoverage EXPORT LagomTargets)
+install(TARGETS LibC LibCrypt LibSystem NoCoverage EXPORT LagomTargets)
# AK/LibCore
# Note: AK is included in LibCore for the host build instead of LibC per the target build