]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/platform-support/pc-windows-gnullvm.md
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / src / doc / rustc / src / platform-support / pc-windows-gnullvm.md
1 # \*-pc-windows-gnullvm
2
3 **Tier: 3**
4
5 Windows targets similar to `*-pc-windows-gnu` but using UCRT as the runtime and various LLVM tools/libraries instead of GCC/Binutils.
6
7 Target triples available so far:
8 - `aarch64-pc-windows-gnullvm`
9 - `x86_64-pc-windows-gnullvm`
10
11 ## Target maintainers
12
13 - [@mati865](https://github.com/mati865)
14
15 ## Requirements
16
17 The easiest way to obtain these targets is cross-compilation but native build from `x86_64-pc-windows-gnu` is possible with few hacks which I don't recommend.
18 Std support is expected to be on pair with `*-pc-windows-gnu`.
19
20 Binaries for this target should be at least on pair with `*-pc-windows-gnu` in terms of requirements and functionality.
21
22 Those targets follow Windows calling convention for `extern "C"`.
23
24 Like with any other Windows target created binaries are in PE format.
25
26 ## Building the target
27
28 For cross-compilation I recommend using [llvm-mingw](https://github.com/mstorsjo/llvm-mingw) toolchain, one change that seems necessary beside configuring cross compilers is disabling experimental `m86k` target. Otherwise LLVM build fails with `multiple definition ...` errors.
29 Native bootstrapping builds require rather fragile hacks until host artifacts are available so I won't describe them here.
30
31 ## Building Rust programs
32
33 Rust does not yet ship pre-compiled artifacts for this target. To compile for
34 this target, you will either need to build Rust with the target enabled (see
35 "Building the target" above), or build your own copy of `core` by using
36 `build-std` or similar.
37
38 ## Testing
39
40 Created binaries work fine on Windows or Wine using native hardware. Testing AArch64 on x86_64 is problematic though and requires spending some time with QEMU.
41 Once these targets bootstrap themselves on native hardware they should pass Rust testsuite.
42
43 ## Cross-compilation toolchains and C code
44
45 Compatible C code can be built with Clang's `aarch64-pc-windows-gnu` and `x86_64-pc-windows-gnu` targets as long as LLVM based C toolchains are used.
46 Those include:
47 - [llvm-mingw](https://github.com/mstorsjo/llvm-mingw)
48 - [MSYS2 with CLANG* environment](https://www.msys2.org/docs/environments)