Targets
| x86_64 | AArch64 | |
|---|---|---|
| Operating system | Linux | Linux |
| Baseline | x86-64-v3 | ARMv8.0-A |
| Implied by baseline | AVX2 and FMA3 guaranteed to the code generator | — |
| ABI | System V AMD64 | AAPCS64 |
| Hardware | Intel Haswell (2013) or later, AMD Zen or later | any ARMv8.0-A |
Both targets are first class. They are not a primary backend and a port: each has its own full backend and its own peephole optimizer, and 2,001 of 2,045 test programs run on both.
The device
Beside the two CPU instruction sets, the compiler ships device code for NVIDIA GPUs — the tensor verbs dispatch to the device by residency, through PTX the compiler emits itself.
| NVIDIA GPU | |
|---|---|
| Requirement | compute capability 7.0 or newer — the Volta generation (2017) and everything after it |
| Driver | the resident NVIDIA driver; nothing else is installed — no vendor toolkit, no build step |
| Mechanism | the shipped sm_70 module, compiled forward by the driver for the card present |
| Surface | tensors declared on gpu, the ToDevice / ToHost transfer verbs, and the tensor verb vocabulary |
| Determinism | device results are digit-identical to host results — the placement law the device probe pins on real hardware |
A program that uses the device links against the driver’s libcuda; a
machine without one still compiles such a program cleanly, and the missing
piece is named at link and run. The GPU, without kernels
is the one-page walk.
Output
- ELF executables, static archives, and shared objects
- Position-independent executables by default
- DWARF v5 debug information with a registered language code, exercised by gdb-driven tests
- Assembly emitted in Intel or AT&T syntax, assembled and linked with GNU binutils
Build axes
Two properties are fixed at build time rather than discovered at runtime:
String encoding — UTF-8 or UTF-32, chosen per binary. Compiled objects are encoding-specific, and UTF-8 symbols carry a distinguishing suffix so that importing with the wrong encoding fails at link time rather than linking the wrong code.
Deployment class — hosted-heap or fixed-arena, selected with
--memory-class when you link. Code generation is byte-identical across both;
regions are scheduled by the compiler within whichever class you pick. See
allocator as a link decision.
Combined with the tasking flavour, the standard library ships as a small matrix of archives per architecture, resolved automatically from the target you name.
Cross-compilation
Either architecture can be built from a host of the other, on one machine, using cross binutils and user-mode emulation for running the results. This is how the test corpus covers both architectures from a single gate host.
What you need installed
binutils | the compiler emits assembly and hands it to as and ld |
libc6-dev | compiled programs link against the C library and its startup objects |
That is the whole list. The compiler binary is statically linked and has no library dependencies of its own — those two are for the programs it produces. See installing Mica.
A VS Code extension provides editor support.