1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

Kernel: Separate kmalloc.cpp into a separate library similar to x86_64

This will allow the call the constructors of the kmalloc.cpp file
before calling the other constructors in the Kernel.
This commit is contained in:
Timon Kruiper 2022-05-09 11:24:03 +02:00 committed by Linus Groh
parent d449fef606
commit 2e49d6b001

View file

@ -434,7 +434,6 @@ else()
Arch/aarch64/vector_table.S
# Files from base Kernel
Heap/kmalloc.cpp
MiniStdLib.cpp
KSyms.cpp
@ -565,9 +564,8 @@ endif()
add_compile_definitions(KERNEL)
add_link_options(LINKER:-z,notext)
if (NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
add_library(kernel_heap STATIC ${KERNEL_HEAP_SOURCES})
endif()
add_library(kernel_heap STATIC ${KERNEL_HEAP_SOURCES})
add_executable(Kernel ${SOURCES})
add_dependencies(Kernel generate_EscapeSequenceStateMachine.h)
@ -598,12 +596,10 @@ if (ENABLE_KERNEL_LTO)
endif()
endif()
if (NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_link_libraries(Kernel PRIVATE kernel_heap gcc)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
target_link_libraries(Kernel PRIVATE kernel_heap clang_rt.builtins)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_link_libraries(Kernel PRIVATE kernel_heap gcc)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
target_link_libraries(Kernel PRIVATE kernel_heap clang_rt.builtins)
endif()
add_custom_command(