serenity/Userland/Libraries/LibSystem/CMakeLists.txt
Itamar ae67cabe11 CMake: Make libc.a self-contained
Previously, libc.a contained undefined symbols from ssp and libsystem,
which caused static compilation to fail.

We now generate libc.a with a custom CMake rule that combines all
object files from libc, ssp and libsystem to form libc.a

Closes #5758.
2021-03-19 22:55:53 +01:00

10 lines
315 B
CMake

set(SOURCES
syscall.cpp
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib")
serenity_libc(LibSystem system)
target_include_directories(LibSystem PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
add_library(LibSystemStatic STATIC ${SOURCES})
target_include_directories(LibSystemStatic PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})