From a5d98b7ccebe7b0c167ca45e1d87698c3009c491 Mon Sep 17 00:00:00 2001 From: wangchen Date: Fri, 5 May 2023 11:04:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20M=E6=A0=B8=E5=A2=9E=E5=8A=A0=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E6=97=B6=E4=B8=8D=E9=93=BE=E6=8E=A5=E5=86=85=E6=A0=B8?= =?UTF-8?q?=E7=9A=84=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 方案描述: 1, 增加编译选项, 默认关闭, 打开时可以不链接内核库, 方便M核上开发多个bin的场景 BREAKING CHANGE: M核增加编译选项LOSCFG_LIB_KERNEL_SKIP, 默认关闭, 打开时可以不链接内核库 Close #I70F5F Signed-off-by: wangchen --- BUILD.gn | 4 +++- Kconfig | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index b5efe743..7394d5e1 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 17ade6bf..d00f92bf 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 -- Gitee