Skip to content

Commit bbe655b

Browse files
committed
doc: Add *-unknown-managarm-mlibc documentation
1 parent f34a05f commit bbe655b

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

src/doc/rustc/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
- [\*-nto-qnx-\*](platform-support/nto-qnx.md)
5959
- [*-unikraft-linux-musl](platform-support/unikraft-linux-musl.md)
6060
- [*-unknown-hermit](platform-support/hermit.md)
61+
- [\*-unknown-managarm-mlibc](platform-support/managarm.md)
6162
- [\*-unknown-netbsd\*](platform-support/netbsd.md)
6263
- [*-unknown-openbsd](platform-support/openbsd.md)
6364
- [\*-unknown-uefi](platform-support/unknown-uefi.md)

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

+1
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ target | std | host | notes
373373
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
374374
[`x86_64-unknown-hermit`](platform-support/hermit.md) | ✓ | | x86_64 Hermit
375375
`x86_64-unknown-l4re-uclibc` | ? | |
376+
[`x86_64-unknown-managarm-mlibc`](platform-support/managarm.md) | | | x86_64 managarm
376377
[`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD
377378
`x86_64-uwp-windows-gnu` | ✓ | |
378379
`x86_64-uwp-windows-msvc` | ✓ | |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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.
14+
15+
## Building the target
16+
17+
For now, building a patched LLVM with [our patches located here](https://github.com/managarm/bootstrap-managarm/tree/master/patches/llvm) is necessary.
18+
19+
Once that is done, set up your `config.toml` like this:
20+
21+
```toml
22+
change-id = 102579
23+
24+
[llvm]
25+
targets = "X86"
26+
download-ci-llvm = false
27+
28+
[build]
29+
target = ["x86_64-unknown-managarm-mlibc", "x86_64-unknown-linux-gnu"]
30+
build-dir = "/path/to/the/build/dir"
31+
docs = false
32+
33+
[install]
34+
prefix = "/path/to/the/prefix"
35+
sysconfdir = "etc"
36+
37+
[rust]
38+
codegen-tests = false
39+
deny-warnings = false
40+
41+
[target.x86_64-unknown-linux-gnu]
42+
llvm-config = "/path/to/your/llvm/bin/llvm-config"
43+
44+
[target.x86_64-unknown-managarm-mlibc]
45+
llvm-config = "/path/to/your/llvm/bin/llvm-config"
46+
```
47+
48+
## Building Rust programs
49+
50+
Build a `x86_64-managarm-gcc` using our [gcc fork](https://github.com/managarm/gcc).
51+
52+
```toml
53+
[build]
54+
rustc = "/path/to/the/rust-prefix/bin/rustc"
55+
target = "x86_64-unknown-managarm-mlibc"
56+
57+
[target.x86_64-unknown-managarm-mlibc]
58+
linker = "/path/to/the/managarm-gcc/bin/x86_64-managarm-gcc"
59+
```
60+
61+
## Testing
62+
63+
This target does not support running the Rust testsuite yet.

0 commit comments

Comments
 (0)