aboutsummaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-03-19 08:07:35 +0300
committerseyko <seyko2@gmail.com>2015-03-19 08:07:35 +0300
commite2650608cdeb865aec9095bfaa00c28b9803fc8a (patch)
tree936e6d38214127bd0b2d1642a19e7e62e56481b9 /libtcc.c
parentaa812e87455271d2b73e7f41832aee496fe81ee0 (diff)
downloadtinycc-e2650608cdeb865aec9095bfaa00c28b9803fc8a.tar.gz
tinycc-e2650608cdeb865aec9095bfaa00c28b9803fc8a.tar.bz2
fix to allow build tcc by build-tcc.bat
move call to print_defines() from tcc.c to the libtcc.c define a print_defines() as a ST_FUNC
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libtcc.c b/libtcc.c
index 94f4324..b04a5cb 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -1338,6 +1338,8 @@ LIBTCCAPI int tcc_add_symbol(TCCState *s, const char *name, const void *val)
LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type)
{
s->output_type = output_type;
+ if (output_type == TCC_OUTPUT_PREPROCESS)
+ print_defines();
if (!s->nostdinc) {
/* default include paths */