|
|
@ -906,6 +906,7 @@ LIBTCCAPI void tcc_delete(TCCState *s1) |
|
|
|
|
|
|
|
/* free include paths */ |
|
|
|
dynarray_reset(&s1->cached_includes, &s1->nb_cached_includes); |
|
|
|
dynarray_reset(&s1->tccinclude_paths, &s1->nb_tccinclude_paths); |
|
|
|
dynarray_reset(&s1->include_paths, &s1->nb_include_paths); |
|
|
|
dynarray_reset(&s1->sysinclude_paths, &s1->nb_sysinclude_paths); |
|
|
|
dynarray_reset(&s1->cmd_include_files, &s1->nb_cmd_include_files); |
|
|
@ -946,6 +947,7 @@ LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type) |
|
|
|
if (!s->nostdinc) { |
|
|
|
/* default include paths */ |
|
|
|
/* -isystem paths have already been handled */ |
|
|
|
tcc_add_tccinclude_path(s, CONFIG_TCC_TCCINCLUDEPATHS); |
|
|
|
tcc_add_sysinclude_path(s, CONFIG_TCC_SYSINCLUDEPATHS); |
|
|
|
} |
|
|
|
|
|
|
@ -983,6 +985,12 @@ LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type) |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
LIBTCCAPI int tcc_add_tccinclude_path(TCCState *s, const char *pathname) |
|
|
|
{ |
|
|
|
tcc_split_path(s, &s->tccinclude_paths, &s->nb_tccinclude_paths, pathname); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
LIBTCCAPI int tcc_add_include_path(TCCState *s, const char *pathname) |
|
|
|
{ |
|
|
|
tcc_split_path(s, &s->include_paths, &s->nb_include_paths, pathname); |
|
|
@ -1821,7 +1829,7 @@ reparse: |
|
|
|
break; |
|
|
|
case TCC_OPTION_iwithprefix: |
|
|
|
snprintf(buf, sizeof buf, "{B}/%s", optarg); |
|
|
|
tcc_add_sysinclude_path(s, buf); |
|
|
|
tcc_add_tccinclude_path(s, buf); |
|
|
|
break; |
|
|
|
case TCC_OPTION_include: |
|
|
|
dynarray_add(&s->cmd_include_files, |
|
|
|