diff --git a/BUILD.gn b/BUILD.gn index b5efe74328d9077e6327dd7f9256222d80e06ee2..7394d5e11a1417c0aeee77f3be4b2c6a58ef1e9d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -181,7 +181,9 @@ static_library("libkernel") { } group("kernel") { - deps = [ ":libkernel" ] + if (!defined(LOSCFG_LIB_KERNEL_SKIP)) { + deps = [ ":libkernel" ] + } } group("liteos_m") { diff --git a/Kconfig b/Kconfig index 17ade6bf29f4998fd3022a6dc492da65c13f4986..d00f92bff1071bb122f073ab19a5bd702c46bc88 100644 --- a/Kconfig +++ b/Kconfig @@ -401,6 +401,10 @@ config LIB_LIBC help Answer Y to enable libc for full code. +config LIB_KERNEL_SKIP + bool "Enable link without LibKernel.a" + default n + endmenu