mirror of
https://github.com/frida/tinycc
synced 2024-11-23 16:19:35 +03:00
macos: don't like in crt startup code
it's not needed with LC_MAIN executables.
This commit is contained in:
parent
51f15d9971
commit
ef730c4d2f
3
libtcc.c
3
libtcc.c
@ -1040,9 +1040,12 @@ LIBTCCAPI int tcc_set_output_type(TCCState *s, int output_type)
|
|||||||
/* add libc crt1/crti objects */
|
/* add libc crt1/crti objects */
|
||||||
if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) &&
|
if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) &&
|
||||||
!s->nostdlib) {
|
!s->nostdlib) {
|
||||||
|
#ifndef TCC_TARGET_MACHO
|
||||||
|
/* Mach-O with LC_MAIN doesn't need any crt startup code. */
|
||||||
if (output_type != TCC_OUTPUT_DLL)
|
if (output_type != TCC_OUTPUT_DLL)
|
||||||
tcc_add_crt(s, "crt1.o");
|
tcc_add_crt(s, "crt1.o");
|
||||||
tcc_add_crt(s, "crti.o");
|
tcc_add_crt(s, "crti.o");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user