TCC文档翻译- 1.Introduction
1. Introduction
TinyCC (aka TCC) is a small but hyper fast C compiler. Unlike other C compilers, it is meant to be self-relying: you do not need an external assembler or linker because TCC does that for you.
TCC compiles so fast that even for big projects Makefile
s may not be necessary.
TCC not only supports ANSI C, but also most of the new ISO C99 standard and many GNUC extensions including inline assembly.
TCC can also be used to make C scripts, i.e. pieces of C source that you run as a Perl or Python script. Compilation is so fast that your script will be as fast as if it was an executable.
TCC can also automatically generate memory and bound checks (see section TinyCC Memory and Bound checks) while allowing all C pointers operations. TCC can do these checks even if non patched libraries are used.
With libtcc
, you can use TCC as a backend for dynamic code generation (see section The libtcc
library).
TCC mainly supports the i386 target on Linux and Windows. There are alpha ports for the ARM (arm-tcc
) and the TMS320C67xx targets (c67-tcc
). More information about the ARM port is available at http://lists.gnu.org/archive/html/tinycc-devel/2003-10/msg00044.html.
For usage on Windows, see also tcc-win32.txt.
1、介绍
tiny cc(aka tcc) 是一个小的但快速的C编译器。不同于其他C编译器,他是一个自我依赖(集成)的编译器(译注:原文为it is meant to be self-relying)。你不需要其他的汇编器和连接器,因为TCC已经都包含了。
如果想要TCC编译器在大的项目中速度快,MAKEFILE是必不可少的。
TCC不止支持ANSI C,并且支持大部分ISO C99标准的特性和许多GNUC扩展的内联汇编。
TCC能使用C脚本。一段C脚本运行起来类似PERL或PYTHON脚本。经过Compliation后的脚本和编译生成的可执行文件一样快。
TCC能管理内存和做边界检查(看 TinyCC 内存和边界检查部分)在任意指针操作中。TCC亦能检查未使用的内存块。
在libtcc中,允许我们使用以动态库的方式使用TCC (请参照 The libtcc library部分).
TCC主要支持I386架构下的WINDOWS和LINUX。亦有alpha版的ARM(ARM-TCC)和TMS320C67XX(C67-TCC)更多信息请参考ARM分支(译注:原文为 More information about the ARM port is available )在线文档:http://lists.gnu.org/archive/html/tinycc-devel/2003-10/msg00044.html.
关于在WINDOWS下如何使用,请参考 tcc-win32.txt