tccpp: no cache for include if #elif seen
#ifndef guards are cached, however after #elif on the same level, the file must be re-read. Also: preprocess asm as such even when there is no assembler (arm).
This commit is contained in:
2
libtcc.c
2
libtcc.c
@ -1334,13 +1334,11 @@ ST_FUNC int tcc_add_file_internal(TCCState *s1, const char *filename, int flags)
|
||||
tcc_strdup(filename));
|
||||
|
||||
parse_flags = 0;
|
||||
#ifdef CONFIG_TCC_ASM
|
||||
/* if .S file, define __ASSEMBLER__ like gcc does */
|
||||
if (filetype == AFF_TYPE_ASM || filetype == AFF_TYPE_ASMPP) {
|
||||
tcc_define_symbol(s1, "__ASSEMBLER__", NULL);
|
||||
parse_flags = PARSE_FLAG_ASM_FILE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (flags & AFF_PREPROCESS) {
|
||||
ret = tcc_preprocess(s1);
|
||||
|
||||
Reference in New Issue
Block a user