From f386f2a1fcae885967278710fe997c56e2183476 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 18 Dec 2025 23:33:26 +0000 Subject: Size-optimise a few things Saves multiple kilobytes, somehow. Unlikely to make much of a performance difference since it's mostly init/shutdown stuff. --- src/langext.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/langext.h') diff --git a/src/langext.h b/src/langext.h index 0624b71..7e3cbdb 100644 --- a/src/langext.h +++ b/src/langext.h @@ -77,6 +77,14 @@ static inline _Noreturn void _invoke_ub() {} //#define tailcall // Can't use this without Clang. #endif +#if defined(__clang__) +#define opt_small __attribute((minsize)) +#elif defined(__GNUC__) +#define opt_small __attribute((optimize("Os"))) +#else +#define opt_small +#endif + #endif // vi: sw=4 ts=4 noet tw=80 cc=80 -- cgit v1.2.3-54-g00ecf