From 2e49d6b001e32fbacafa10226814f381a3f6b89c Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Mon, 9 May 2022 11:24:03 +0200 Subject: [PATCH] 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. --- Kernel/CMakeLists.txt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt index d501927f09..f3ff63133c 100644 --- a/Kernel/CMakeLists.txt +++ b/Kernel/CMakeLists.txt @@ -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(