clang-retro¶
clang-retro brings a current clang and LLVM to 16 and 32-bit systems that upstream LLVM does not support, with a C library, C++ and the system's own API for each. Every repository has its own documentation site.
clang --target=i8086-pc-msdos -Os hello.c -o hello.exe # MS-DOS
clang --config=win31.cfg -Os hello.c -o hello.exe # Windows 3.1
clang --config=win95.cfg -O2 hello.c -o hello.exe # Windows 95
clang --target=i386-pc-os2 -Os hello.c -o hello.exe # OS/2
clang --target=m68k-amigaos -O2 hello.c -o hello # AmigaOS
clang --target=m68k-atari-tos -O2 hello.c -o hello.tos # Atari ST
Getting started¶
Most people only need the toolchain package, which has the compiler, the linkers and a sysroot for every target below: see the toolchain package.
| Platform | Target triple | Documentation |
|---|---|---|
| MS-DOS (8086 and up) | i8086-pc-msdos |
dos-sdk |
| Windows 1.x, 2.x and 3.x | i8086-pc-win16 |
win16-sdk |
| Win32s, Windows NT 3.1 to 11, 95/98/ME | i386-pc-windows*-gnu, x86_64-w64-mingw32 |
win32-sdk |
| MFC programs on Win32 | (any Windows target) | mfc |
| OS/2 1.x, 2.x to 4.x, ArcaOS | i8086-pc-os2, i386-pc-os2 |
os2-sdk |
| Classic Mac OS, System 0.1 to 9 | m68k-apple-macos, powerpc-apple-macos9 |
mac-sdk |
| AmigaOS, Kickstart 1.3 to 3.x | m68k-amigaos |
amiga-sdk |
| Atari ST, STe, TT and Falcon | m68k-atari-tos |
atari-sdk |
The toolchain¶
| Repository | What it is | Documentation |
|---|---|---|
| llvm | LLVM and clang with the 8086 backend, the retro targets and their drivers | llvm |
| picolibc | The C library, with a layer for each system | picolibc |
| JWlink | The linker for DOS, Win16 and OS/2 programs | JWlink |
| dos-sdk | The DOS sysroot, the toolchain packages and the CI that ties it all together | dos-sdk |
License¶
The SDKs are free software under the GNU Affero General Public License, version 3 only. The forks of LLVM, picolibc and JWlink keep their upstream licenses. Contributors keep the copyright in their own work and sign off their commits under the Developer Certificate of Origin.