Skip to content

Commit 4755ebe

Browse files
Nicolas Pitrecarlescufi
authored andcommitted
lib/cbprintf: CONFIG_CBPRINTF_LIBC_SUBSTS should be optional
When aiming for the smallest build result, it is desirable to use CONFIG_CBPRINTF_NANO together with CONFIG_MINIMAL_LIBC. However that doesn't mean we need all the functions enabled by having CONFIG_CBPRINTF_LIBC_SUBSTS=y which increases the binary size even if those functions are not used and not linked in. When CONFIG_CBPRINTF_LIBC_SUBSTS=n such functions are not defined anyway so z_cbvprintf_impl() won't be invoked with missing functionalities. Signed-off-by: Nicolas Pitre <[email protected]>
1 parent 35e3bfc commit 4755ebe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/os/Kconfig.cbprintf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ config CBPRINTF_COMPLETE
1616
config CBPRINTF_NANO
1717
bool "Space-optimized but feature-limited"
1818
# nano needs to count characters if it's the formatter for libc
19-
select CBPRINTF_LIBC_SUBSTS if MINIMAL_LIBC
19+
imply CBPRINTF_LIBC_SUBSTS if MINIMAL_LIBC
2020
help
2121
If selected a completely different implementation of the core
2222
formatting capability is substituted. This has a much smaller code

0 commit comments

Comments
 (0)