mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-13 05:10:07 +08:00
Define __TCC_BACKTRACE_ENABLED__ if backtrace is enabled
If the `-btN` was specified, then the __TCC_BACKTRACE_ENABLED__ macro will be defined. This provides a way for user code to tell if tcc_backtrace is defined or not.
This commit is contained in:
parent
af1abf1f45
commit
8482682061
4
tccpp.c
4
tccpp.c
@ -3756,6 +3756,10 @@ static void tcc_predefs(TCCState *s1, CString *cs, int is_asm)
|
|||||||
#ifdef CONFIG_TCC_BCHECK
|
#ifdef CONFIG_TCC_BCHECK
|
||||||
if (s1->do_bounds_check)
|
if (s1->do_bounds_check)
|
||||||
putdef(cs, "__BOUNDS_CHECKING_ON");
|
putdef(cs, "__BOUNDS_CHECKING_ON");
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_TCC_BACKTRACE
|
||||||
|
if (s1->do_backtrace)
|
||||||
|
putdef(cs, "__TCC_BACKTRACE_ENABLED__");
|
||||||
#endif
|
#endif
|
||||||
cstr_printf(cs, "#define __SIZEOF_POINTER__ %d\n", PTR_SIZE);
|
cstr_printf(cs, "#define __SIZEOF_POINTER__ %d\n", PTR_SIZE);
|
||||||
cstr_printf(cs, "#define __SIZEOF_LONG__ %d\n", LONG_SIZE);
|
cstr_printf(cs, "#define __SIZEOF_LONG__ %d\n", LONG_SIZE);
|
||||||
|
Loading…
Reference in New Issue
Block a user