Tiny C Compiler for the Cygwin runtime — native Windows, tiny footprint, fast builds.
TCCygwin is a lightweight C compiler built as a native Windows application that produces programs using the Cygwin POSIX runtime, cygwin1.dll. It combines the small footprint and fast compilation of Tiny C Compiler (TCC) with Cygwin's POSIX capabilities for lightweight C development and compiler bootstrapping on Windows.
A tiny compiler with POSIX superpowers.
Features · Packages · Build · Runtime setup · Documentation · License
- C compilation with an integrated preprocessor and assembler.
- Cygwin POSIX API support in the generated programs through cygwin1.dll.
- Native Windows compiler with a compact distribution: approximately 2 MB per unpacked binary package.
- Self-hosting builds using the compiler to compile itself.
- Automated bootstrapping with one main batch script that prepares and builds all three compiler variants.
For detailed language support, options, and limitations, see the compiler documentation in doc/.
Prebuilt compiler packages are available alongside the source package, TCCygwin-b1b8637.
Each unpacked binary package is approximately 2 MB. The Cygwin runtime is obtained separately; see Runtime setup.
The compiler is implemented in C with assembly components, based on TinyCC, and built through a self-hosting bootstrap process.
These identifiers describe the source baseline used for this package.
The source package includes an already-built native Windows bootstrap compiler.
-
Extract TCCygwin-b1b8637.
-
Open Command Prompt in the directory containing the build scripts.
-
Run the main build script: BUILD_TCCygwin.bat
BUILD_TCCygwin.bat is the recommended entry point for the complete build. It bootstraps x86_64-win32-tcc four times, then builds both TCCygwin variants.
The source package also provides scripts for building the native Windows compiler separately:
You only need to invoke the main script for the complete build; the table above is not a sequence of commands to run manually.
TCCygwin itself runs natively on Windows. Programs compiled for its Cygwin target require cygwin1.dll at runtime.
Select the runtime corresponding to your TCCygwin package:
Additional download locations are listed on the Cygwin mirrors page. Availability of these specific archive versions may change over time.
Open the archive with an archive manager and extract usr/bin/cygwin1.dll. This is the runtime DLL needed by the generated application; the compiler does not need it merely to run as a native Windows program.
For a minimal application, place the generated .exe and cygwin1.dll beside each other. For a structured environment, use a dedicated bin directory, for example:
An application may also need other libraries, configuration files, or directories according to the APIs and dependencies it uses. Placing the executable beside the DLL supplies the runtime dependency; it does not create a complete Cygwin environment.
Compiler descriptions and usage examples are provided in doc/. Refer to that directory for the invocation syntax and options of the compiler variant you select.
To use a prebuilt package:
-
Extract the desired compiler package.
-
Follow the compilation examples in doc/.
-
Place the corresponding cygwin1.dllalongside your generated application, as described in Runtime setup.
-
Run the application from Command Prompt. For an output file named my-program.exe:my-program.exe
- TCCygwin: Przemysław Korcik — project adaptation and build integration.
- Tiny C Compiler: Fabrice Bellard, original creator, and the TinyCC developers and contributors.
- Cygwin: Cygwin developers and contributors, for the POSIX runtime and related components.
The compiler is distributed under GNU LGPL v2.1. See COPYING-LGPLv21 for the license text.
Cygwin-related components have their own applicable licensing terms. These include crt0.c, INCLUDE_3610100/, and INCLUDE_3700602/ within the cygwin/ directory. Consult the relevant source notices and the accompanying license files:
- COPYING-CYGWIN
- COPYING-GPLv20
- COPYING-GPLv30
- COPYING-LGPLv21
- COPYING-LGPLv30
The compiler license does not replace the licensing terms of the bundled Cygwin components.