check strlen(TCC_LIBTCC1) before tcc_add_support(s1, TCC_LIBTCC1)

This commit is contained in:
wanjochan 2020-09-18 06:57:56 +08:00
parent aed5cd0ce9
commit bea7dcde86
2 changed files with 2 additions and 0 deletions

View File

@ -1457,6 +1457,7 @@ ST_FUNC void tcc_add_runtime(TCCState *s1)
tcc_add_btstub(s1);
}
#endif
if ( strlen ( TCC_LIBTCC1 ) > 0 )
tcc_add_support(s1, TCC_LIBTCC1);
#ifndef TCC_TARGET_MACHO
/* add crt end if not memory output */

View File

@ -1923,6 +1923,7 @@ static void pe_add_runtime(TCCState *s1, struct pe_info *pe)
"msvcrt", "kernel32", "", "user32", "gdi32", NULL
};
const char **pp, *p;
if ( strlen ( TCC_LIBTCC1 ) > 0 )
tcc_add_support(s1, TCC_LIBTCC1);
for (pp = libs; 0 != (p = *pp); ++pp) {
if (*p)