From 2eb14f14691c69edb77d7f5a31512ce5e665ec9b Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Fri, 26 May 2023 13:15:09 +0200 Subject: [PATCH] Kconfig: Add new NATIVE_LIBRARY and NATIVE_BUILD options To differentiate builds which will produce a native executable as direct output from the Zephyr build, or a library which can be used later. Signed-off-by: Alberto Escolar Piedras --- Kconfig.zephyr | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Kconfig.zephyr b/Kconfig.zephyr index 38d86271311..fffb658b15a 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -316,14 +316,30 @@ config CODING_GUIDELINE_CHECK Use available compiler flags to check coding guideline rules during the build. -config NATIVE_APPLICATION - bool "Build as a native host application" +config NATIVE_BUILD + bool select FULL_LIBC_SUPPORTED select FULL_LIBCPP_SUPPORTED if CPP + help + Zephyr will be built targeting the host system for debug and + development purposes. + +config NATIVE_APPLICATION + bool + default y if ARCH_POSIX + depends on !NATIVE_LIBRARY + select NATIVE_BUILD help Build as a native application that can run on the host and using resources and libraries provided by the host. +config NATIVE_LIBRARY + bool + select NATIVE_BUILD + help + Build as a prelinked library for the native host target. + This library can later be built into an executable for the host. + config COMPILER_FREESTANDING bool "Build in a freestanding compiler mode" help