clang-retro LLVM¶
This is LLVM and clang with support for 16 and 32-bit systems that upstream LLVM does not target: MS-DOS and 16-bit Windows on the 8086, CP/M-86, CP/M-80 on the Z80 and the 8080, OS/2, Windows from Win32s and NT 3.1 to 11, classic Mac OS on 68k and PowerPC, AmigaOS, the Atari ST family, and 32-bit Mac OS X on PowerPC. These pages describe only what the fork adds. For everything else, see the upstream LLVM documentation and clang's.
clang --target=i8086-pc-msdos -mcmodel=large -Os app.c -o app.exe
clang --target=i8086-pc-win16 -Os hello.c -o hello.exe
clang --target=m68k-amigaos -O2 hello.c -o hello
clang --target=m68k-atari-tos -O2 gemhello.c -o gemhello.prg
clang --target=i386-pc-os2 -Os hello.c -o hello.exe
-
Targets
Every target the fork adds, with its triple, object format, linker and default sysroot.
-
The 8086 backend
16-bit x86: memory models, near, far and huge pointers, OMF objects, Win16 code and C++.
-
68k and PowerPC
The M68k fixes behind AmigaOS, Atari TOS and classic Mac OS, and PowerPC for Mac OS 9 and Mac OS X.
-
Z80 and 8080
A new backend for the Z80 and the 8080: the ABI, the assembler and ELF objects, and CP/M-80.
-
Tools
llvm-elf2hunk, llvm-elf2tos, llvm-rc for Win16 and the other additions to the LLVM tools and lld.
-
Build it
Build the fork, or use the prebuilt toolchain package.
-
The SDKs
Headers, C libraries and examples for each system: all clang-retro projects.
Getting it¶
Most people want the clang-dos toolchain
package, which has
this clang, lld, JWlink and a sysroot for every target, for Linux and
Windows hosts. Its nightly build follows the main branch here.
License¶
The fork keeps LLVM's license, the Apache License v2.0 with LLVM Exceptions, for its changes too, so that they can go upstream. See LICENSE.TXT.