lib: os: build fdtable conditionally

Stop building fdtable by default, make it conditional and build it only
when needed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2023-09-25 12:30:16 +00:00
parent cf8f92d73e
commit 6d23a960db
7 changed files with 13 additions and 1 deletions

View File

@ -8,6 +8,7 @@ menuconfig WIFI_SIMPLELINK
select SIMPLELINK_HOST_DRIVER
select WIFI_OFFLOAD
select NET_L2_WIFI_MGMT
select FDTABLE
if WIFI_SIMPLELINK

View File

@ -9,7 +9,6 @@ zephyr_sources_ifdef(CONFIG_BASE64 base64.c)
zephyr_sources(
cbprintf_packaged.c
dec.c
fdtable.c
hex.c
printk.c
rb.c
@ -22,6 +21,7 @@ zephyr_sources(
multi_heap.c
)
zephyr_sources_ifdef(CONFIG_FDTABLE fdtable.c)
zephyr_sources_ifdef(CONFIG_ONOFF onoff.c)
zephyr_sources_ifdef(CONFIG_NOTIFY notify.c)

View File

@ -3,6 +3,13 @@
menu "OS Support Library"
config FDTABLE
bool "File descriptor table"
help
This file provides generic file descriptor table implementation, suitable
for any I/O object implementing POSIX I/O semantics (i.e. read/write +
aux operations).
config JSON_LIBRARY
bool "Build JSON library"
help

View File

@ -7,6 +7,7 @@ config EVENTFD
bool "Support for eventfd"
depends on !NATIVE_APPLICATION
select POLL
select FDTABLE
default y if POSIX_API
help
Enable support for event file descriptors, eventfd. An eventfd can

View File

@ -6,6 +6,7 @@ config POSIX_FS
bool "POSIX file system API support"
default y if POSIX_API
depends on FILE_SYSTEM
select FDTABLE
help
This enables POSIX style file system related APIs.

View File

@ -5,6 +5,7 @@
menuconfig NET_SOCKETS
bool "BSD Sockets compatible API"
select FDTABLE
help
Provide BSD Sockets like API on top of native Zephyr networking API.

View File

@ -1,3 +1,4 @@
CONFIG_ZTEST=y
CONFIG_POSIX_API=y
CONFIG_ZTEST_NEW_API=y
CONFIG_FDTABLE=y