meta: replace cmake mono-build system with a custom build co-ordinator
every system component now has its own self-contained build system, and a seed file describing the component and its build system and dependencies. a new tool, meadow, collects and uses these seed files to build the components into a full system. meadow also manages the target system root and a host prefix where toolchain tools are installed to. the build system has also been updated to use a new $ARCH-rosetta-gcc compiler, and the patches files necessary to build it have been added to toolchain/cross-compiler.
This commit is contained in:
+12
-21
@@ -1,10 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.31)
|
||||
project(libc C ASM)
|
||||
|
||||
set(source_dirs core malloc io exec)
|
||||
|
||||
set(LIBC_STANDALONE FALSE)
|
||||
set(public_include_dirs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
add_subdirectory(runtime)
|
||||
|
||||
foreach (dir ${source_dirs})
|
||||
add_subdirectory(${dir})
|
||||
set(sources ${sources} ${component_sources})
|
||||
@@ -12,22 +14,11 @@ foreach (dir ${source_dirs})
|
||||
set(public_include_dirs ${public_include_dirs} ${component_public_include_dirs})
|
||||
endforeach (dir)
|
||||
|
||||
rosetta_add_library(SHARED
|
||||
NAME libc
|
||||
PUBLIC_INCLUDE_DIRS ${public_include_dirs}
|
||||
SOURCES ${sources}
|
||||
HEADERS ${headers})
|
||||
|
||||
sysroot_add_library(
|
||||
NAME libc
|
||||
HEADER_DIR /usr/include
|
||||
LIB_DIR /usr/lib)
|
||||
bsp_add_library(
|
||||
NAME libc
|
||||
LIB_DIR /usr/lib)
|
||||
|
||||
target_link_libraries(libc PRIVATE librosetta libxpc-static liblaunch-static interface::fs)
|
||||
target_link_libraries(libc PUBLIC libmagenta)
|
||||
target_compile_definitions(libc PRIVATE ENABLE_GLOBAL_HEAP=1)
|
||||
|
||||
add_subdirectory(pthread)
|
||||
add_library(libc SHARED ${sources} ${headers})
|
||||
target_include_directories(libc PUBLIC ${public_include_dirs})
|
||||
target_link_libraries(libc PRIVATE rosetta libxpc.a liblaunch.a libmagenta.a)
|
||||
target_compile_options(libc PRIVATE -ffreestanding -nostdlib)
|
||||
target_link_options(libc PRIVATE -ffreestanding -nostdlib)
|
||||
target_compile_definitions(libc PRIVATE ENABLE_GLOBAL_HEAP=1 BUILD_SHARED=1)
|
||||
set_target_properties(libc PROPERTIES PREFIX "")
|
||||
install(TARGETS libc)
|
||||
|
||||
Reference in New Issue
Block a user