Accept option "-Os" and define "__OPTIMIZE_SIZE__"

Some headers and source code change macros and
implementation, when __OPTIMIZE_SIZE__ is defined.

This does not change our generated code.

Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
This commit is contained in:
Detlef Riekenberg
2022-04-10 17:32:38 +02:00
parent b3bebdb20a
commit 3ce7bc6efc
2 changed files with 7 additions and 1 deletions

View File

@@ -3733,6 +3733,8 @@ static void tcc_predefs(TCCState *s1, CString *cs, int is_asm)
putdef(cs, "__CHAR_UNSIGNED__");
if (s1->optimize > 0)
putdef(cs, "__OPTIMIZE__");
if (s1->optimize == 's')
putdef(cs, "__OPTIMIZE_SIZE__");
if (s1->option_pthread)
putdef(cs, "_REENTRANT");
if (s1->leading_underscore)