From 35743cc8e600d043560e08d6527d65111355d59c Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 2 Sep 2024 21:28:02 +0300 Subject: [PATCH] LibC: Compile both static and shared version of LibC libc target is now set as an alias for libc-static --- userspace/libraries/LibC/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/userspace/libraries/LibC/CMakeLists.txt b/userspace/libraries/LibC/CMakeLists.txt index f0ce183f..9cacaaf1 100644 --- a/userspace/libraries/LibC/CMakeLists.txt +++ b/userspace/libraries/LibC/CMakeLists.txt @@ -72,16 +72,19 @@ banan_include_headers(objlibc kernel) banan_install_headers(objlibc) -add_library(libc STATIC $) +add_library(libc-static STATIC $) add_library(libc-shared SHARED $) -target_link_options(libc PRIVATE -nolibc) +target_link_options(libc-static PRIVATE -nolibc) target_link_options(libc-shared PRIVATE -nolibc) -install(TARGETS libc OPTIONAL) +install(TARGETS libc-static OPTIONAL) install(TARGETS libc-shared OPTIONAL) +set_target_properties(libc-static PROPERTIES OUTPUT_NAME libc) set_target_properties(libc-shared PROPERTIES OUTPUT_NAME libc) +add_library(libc ALIAS libc-static) + set(CMAKE_STATIC_LIBRARY_PREFIX "") set(CMAKE_SHARED_LIBRARY_PREFIX "")