Added LFS_LITTLER for disabling non-essential/debugging utils
This is a simple alias for a number of existing defines:
LFS_LITTLER => LFS_NO_DEBUG
LFS_NO_INFO
LFS_NO_WARN
LFS_NO_ERROR
LFS_NO_ASSERT
This is mainly to make CI/code measurements easier. I suspect most
systems already make these zero (or at least minimal) cost in release
mode, but when building with our Makefile we need some way to disable
the simple printf/assert mapping.
This probably deserves a better name, but at least this is something.
This commit is contained in:
+16
@@ -20,6 +20,22 @@
|
|||||||
#include LFS_STRINGIZE(LFS_CONFIG)
|
#include LFS_STRINGIZE(LFS_CONFIG)
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
||||||
|
// Some convenient macro aliases
|
||||||
|
// TODO move these to something like lfs_cfg.h?
|
||||||
|
|
||||||
|
// LFS_LITTLER disables non-essential/debugging utils
|
||||||
|
//
|
||||||
|
// note your system may already make these zero cost in release mode
|
||||||
|
#ifdef LFS_LITTLER
|
||||||
|
#define LFS_NO_DEBUG
|
||||||
|
#define LFS_NO_INFO
|
||||||
|
#define LFS_NO_WARN
|
||||||
|
#define LFS_NO_ERROR
|
||||||
|
#define LFS_NO_ASSERT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// System includes
|
// System includes
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user