Skip to content

Commit 675c8ca

Browse files
committed
doc: Add *-unknown-managarm-mlibc documentation
1 parent cf32d7e commit 675c8ca

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

src/doc/rustc/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
- [\*-unikraft-linux-musl](platform-support/unikraft-linux-musl.md)
117117
- [\*-unknown-hermit](platform-support/hermit.md)
118118
- [\*-unknown-freebsd](platform-support/freebsd.md)
119+
- [\*-unknown-managarm-mlibc](platform-support/managarm.md)
119120
- [\*-unknown-netbsd\*](platform-support/netbsd.md)
120121
- [\*-unknown-openbsd](platform-support/openbsd.md)
121122
- [\*-unknown-redox](platform-support/redox.md)

src/doc/rustc/src/platform-support.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ target | std | host | notes
258258
[`aarch64-unknown-hermit`](platform-support/hermit.md) | ✓ | | ARM64 Hermit
259259
[`aarch64-unknown-illumos`](platform-support/illumos.md) | ✓ | ✓ | ARM64 illumos
260260
`aarch64-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (ILP32 ABI)
261+
[`aarch64-unknown-managarm-mlibc`](platform-support/managarm.md) | ? | | ARM64 Managarm
261262
[`aarch64-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | ARM64 NetBSD
262263
[`aarch64-unknown-nto-qnx700`](platform-support/nto-qnx.md) | ? | | ARM64 QNX Neutrino 7.0 RTOS |
263264
[`aarch64-unknown-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 7.1 RTOS with default network stack (io-pkt) |
@@ -388,6 +389,7 @@ target | std | host | notes
388389
`riscv64gc-unknown-freebsd` | ? | | RISC-V FreeBSD
389390
`riscv64gc-unknown-fuchsia` | ? | | RISC-V Fuchsia
390391
[`riscv64gc-unknown-hermit`](platform-support/hermit.md) | ✓ | | RISC-V Hermit
392+
[`riscv64gc-unknown-managarm-mlibc`](platform-support/managarm.md) | ? | | RISC-V Managarm
391393
[`riscv64gc-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | RISC-V NetBSD
392394
[`riscv64gc-unknown-nuttx-elf`](platform-support/nuttx.md) | ✓ | | RISC-V 64bit with NuttX
393395
[`riscv64gc-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/riscv64
@@ -428,6 +430,7 @@ target | std | host | notes
428430
[`x86_64-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 64-bit GNU/Hurd
429431
`x86_64-unknown-l4re-uclibc` | ? | |
430432
[`x86_64-unknown-linux-none`](platform-support/x86_64-unknown-linux-none.md) | * | | 64-bit Linux with no libc
433+
[`x86_64-unknown-managarm-mlibc`](platform-support/managarm.md) | ? | | x86_64 Managarm
431434
[`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD
432435
[`x86_64-unknown-trusty`](platform-support/trusty.md) | ✓ | |
433436
`x86_64-uwp-windows-gnu` | ✓ | |
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# `*-unknown-managarm-mlibc`
2+
3+
**Tier: 3**
4+
5+
## Target Maintainers
6+
7+
- [@no92](https://github.com/no92)
8+
- [@64](https://github.com/64)
9+
- [@Dennisbonke](https://github.com/Dennisbonke)
10+
11+
## Requirements
12+
13+
This target is cross-compiled. There is currently no support for `std` yet. It generates binaries in the ELF format. Currently, we support the `x86_64`, `aarch64` and `riscv64gc` architectures. The examples below `$ARCH` should be substituted for one of the supported architectures.
14+
15+
## Building the target
16+
17+
Managarm has upstream support in LLVM since the release of 21.1.0.
18+
19+
Set up your `bootstrap.toml` like this:
20+
21+
```toml
22+
change-id = 142379
23+
24+
[llvm]
25+
targets = "X86;AArch64;RISCV"
26+
download-ci-llvm = false
27+
28+
[build]
29+
target = ["$ARCH-unknown-managarm-mlibc", "x86_64-unknown-linux-gnu"]
30+
31+
[target.x86_64-unknown-linux-gnu]
32+
llvm-config = "/path/to/your/llvm/bin/llvm-config"
33+
34+
[target.$ARCH-unknown-managarm-mlibc]
35+
llvm-config = "/path/to/your/llvm/bin/llvm-config"
36+
```
37+
38+
## Building Rust programs
39+
40+
Build a `$ARCH-managarm-gcc` using our [gcc fork](https://github.com/managarm/gcc).
41+
42+
```toml
43+
[build]
44+
rustc = "/path/to/the/rust-prefix/bin/rustc"
45+
target = "$ARCH-unknown-managarm-mlibc"
46+
47+
[target.$ARCH-unknown-managarm-mlibc]
48+
linker = "/path/to/the/managarm-gcc/bin/$ARCH-managarm-gcc"
49+
```
50+
51+
## Testing
52+
53+
This target does not support running the Rust testsuite yet.

0 commit comments

Comments
 (0)