Tuesday, October 24, 2017

tcc compiler



Tiny C Compiler (TCC) is small and fast C compiler for x86 machines developed by Fabrice Bellard in 2002. Main features of TCC are:
  • TCC is SMALL! You can compile and execute C code everywhere, for example on rescue disks (about 100KB for x86 TCC executable, including C preprocessor, C compiler, assembler and linker).
  • TCC is FAST! tcc generates x86 code. No byte code overhead. Compile, assemble and link several times faster than GCC.
  • TCC is UNLIMITED! Any C dynamic library can be used directly. TCC is heading toward full ISOC99 compliance. TCC can of course compile itself.
  • SAFE! tcc includes an optional memory and bound checker. Bound checked code can be mixed freely with standard code.
You can download Windows binary distribution of TCC at http://bellard.org/tcc/.
Here is a session of compiling, linking and executing a simple C program with TCC on a Windows system:
C:\herong>type hello.c
#include <stdio.h>
main() {
   printf("Hello world!\n");
}

C:\herong>\local\tcc\tcc -c hello.c -o hello.o -v
tcc version 0.9.24
-> hello.c
<- hello.o

C:\herong>\local\tcc\tcc hello.o -o hello.exe -v
tcc version 0.9.24
-> hello.o
<- hello.exe (1536 bytes)

C:\herong>hello.exe
Hello world!

https://github.com/xobs/tinycc