超小型C编译器简介——Tiny C Compiler(TCC)

来源:互联网 发布:js获取移动设备型号 编辑:程序博客网 时间:2024/05/16 16:10

① 网址:http://bellard.org/tcc/

    注意:这个网页下面几个有用的链接:

      Obfuscated Tiny C Compiler ——http://bellard.org/otcc/

      The International Obfuscated C Code Contest(国际混乱C语言大赛)——http://www.ioccc.org/


特点:

  • 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).
  • FAST! tcc generates x86 code. No byte code overhead. Compile, assemble and link several timesfaster than GCC.
  • UNLIMITED! Any C dynamic library can be used directly. TCC is heading torward fullISOC99 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.
  • Compile and execute C source directly. No linking or assembly necessary. Full C preprocessor and GNU-like assembler included.
  • C script supported : just add '#!/usr/local/bin/tcc -run' at the first line of your C source, and execute it directly from the command line.
  • With libtcc, you can use TCC as a backend for dynamic code generation. 

②   编译

 ./configure
   make
   make test
   make install


③ 测试

正常编译:tcc -o ex1 ex1.c

脚本方式:当前目录下,./ex1.c


原创粉丝点击