Skip to content

Commit 17180f4

Browse files
committed
Auto merge of #94872 - mati865:mingw-llvm-target, r=petrochenkov
Add MVP LLVM based mingw-w64 targets Fixes #72241 Those are `rustc` side changes to create working x86_64 and AArch64 Rustc hosts and targets. Apart from this PR changes to various crates are required which I'll do once this is accepted. I'm expecting more changes on `rustc` side later on as I cannot even run full testsuite at this moment because passing JSON spec breaks paths in various tests. Tier 3 policy: > A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.) I pledge to do my best maintaining it, MSYS2 is one of interested consumers so it should have enough testing (after the releases). > Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target. This triple name was discussed at [`t-compiler/LLVM+mingw-w64 Windows targets`](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/LLVM.2Bmingw-w64.20Windows.20targets) > Target names should not introduce undue confusion or ambiguity unless absolutely necessary to maintain ecosystem compatibility. For example, if the name of the target makes people extremely likely to form incorrect beliefs about what it targets, the name should be changed or augmented to disambiguate it. I think the explanation in platform support doc is enough to make this aspect clear. > Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users. It's using open source tools only. > The target must not introduce license incompatibilities. It's even more liberal than already existing `*-pc-windows-gnu`. > Anything added to the Rust repository must be under the standard Rust license (MIT OR Apache-2.0). Understood. > The target must not cause the Rust tools or libraries built for any other host (even when supporting cross-compilation to the target) to depend on any new dependency less permissive than the Rust licensing policy. This applies whether the dependency is a Rust crate that would require adding new license exceptions (as specified by the tidy tool in the rust-lang/rust repository), or whether the dependency is a native library or binary. In other words, the introduction of the target must not cause a user installing or running a version of Rust or the Rust tools to be subject to any new license requirements. There are no new dependencies/features required. > Compiling, linking, and emitting functional binaries, libraries, or other code for the target (whether hosted on the target itself or cross-compiling from another target) must not depend on proprietary (non-FOSS) libraries. Host tools built for the target itself may depend on the ordinary runtime libraries supplied by the platform and commonly used by other applications built for the target, but those libraries must not be required for code generation for the target; cross-compilation to the target must not require such libraries at all. For instance, rustc built for the target may depend on a common proprietary C runtime library or console output library, but must not depend on a proprietary code generation library or code optimization library. Rust's license permits such combinations, but the Rust project has no interest in maintaining such combinations within the scope of Rust itself, even at tier 3. As previously said it's using open source tools only. > "onerous" here is an intentionally subjective term. At a minimum, "onerous" legal/licensing terms include but are not limited to: non-disclosure requirements, non-compete requirements, contributor license agreements (CLAs) or equivalent, "non-commercial"/"research-only"/etc terms, requirements conditional on the employer or employment of any particular Rust developers, revocable terms, any requirements that create liability for the Rust project or its developers or users, or any requirements that adversely affect the livelihood or prospects of the Rust project or its developers or users. There are no such terms present/ > Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions. I'm not the reviewer here. > This requirement does not prevent part or all of this policy from being cited in an explicit contract or work agreement (e.g. to implement or maintain support for a target). This requirement exists to ensure that a developer or team responsible for reviewing and approving a target does not face any legal threats or obligations that would prevent them from freely exercising their judgment in such approval, even if such judgment involves subjective matters or goes beyond the letter of these requirements. Again I'm not the reviewer here. > Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions. > The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary. Building is described in platform support doc, running tests doesn't work right now (without hacks) because Rust's build system doesn't seem to support testing targets built from `.json`. Docs will be updated once this lands in beta allowing master branch to build and run tests without `.json` files. > Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via `@)` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages. Understood. > Backlinks such as those generated by the issue/PR tracker when linking to an issue or PR are not considered a violation of this policy, within reason. However, such messages (even on a separate repository) must not generate notifications to anyone involved with a PR who has not requested such notifications. Understood. > Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target. I believe I didn't break any other target. > In particular, this may come up when working on closely related targets, such as variations of the same architecture with different features. Avoid introducing unconditional uses of features that another variation of the target may not have; use conditional compilation or runtime detection, as appropriate, to let each target run code supported by that target. I think there are no such problems in this PR.
2 parents c318799 + 60361f2 commit 17180f4

File tree

14 files changed

+175
-18
lines changed

14 files changed

+175
-18
lines changed

Diff for: compiler/rustc_codegen_llvm/src/back/archive.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ impl<'a> ArchiveBuilder<'a> for LlvmArchiveBuilder<'a> {
152152
};
153153

154154
let target = &self.config.sess.target;
155-
let mingw_gnu_toolchain =
156-
target.vendor == "pc" && target.os == "windows" && target.env == "gnu";
155+
let mingw_gnu_toolchain = target.vendor == "pc"
156+
&& target.os == "windows"
157+
&& target.env == "gnu"
158+
&& target.abi.is_empty();
157159

158160
let import_name_and_ordinal_vector: Vec<(String, Option<u16>)> = dll_imports
159161
.iter()

Diff for: compiler/rustc_llvm/build.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,10 @@ fn main() {
324324

325325
let stdcppname = if target.contains("openbsd") {
326326
if target.contains("sparc64") { "estdc++" } else { "c++" }
327-
} else if target.contains("freebsd") {
328-
"c++"
329-
} else if target.contains("darwin") {
327+
} else if target.contains("darwin")
328+
|| target.contains("freebsd")
329+
|| target.contains("windows-gnullvm")
330+
{
330331
"c++"
331332
} else if target.contains("netbsd") && llvm_static_stdcpp.is_some() {
332333
// NetBSD uses a separate library when relocation is required
@@ -365,7 +366,7 @@ fn main() {
365366

366367
// Libstdc++ depends on pthread which Rust doesn't link on MinGW
367368
// since nothing else requires it.
368-
if target.contains("windows-gnu") {
369+
if target.ends_with("windows-gnu") {
369370
println!("cargo:rustc-link-lib=static:-bundle=pthread");
370371
}
371372
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
use crate::spec::Target;
2+
3+
pub fn target() -> Target {
4+
let mut base = super::windows_gnullvm_base::opts();
5+
base.max_atomic_width = Some(64);
6+
base.features = "+neon,+fp-armv8".into();
7+
base.linker = Some("aarch64-w64-mingw32-clang".into());
8+
9+
Target {
10+
llvm_target: "aarch64-pc-windows-gnu".into(),
11+
pointer_width: 64,
12+
data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".into(),
13+
arch: "aarch64".into(),
14+
options: base,
15+
}
16+
}

Diff for: compiler/rustc_target/src/spec/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ mod uefi_msvc_base;
8282
mod vxworks_base;
8383
mod wasm_base;
8484
mod windows_gnu_base;
85+
mod windows_gnullvm_base;
8586
mod windows_msvc_base;
8687
mod windows_uwp_gnu_base;
8788
mod windows_uwp_msvc_base;
@@ -939,6 +940,9 @@ supported_targets! {
939940
("i686-uwp-windows-gnu", i686_uwp_windows_gnu),
940941
("x86_64-uwp-windows-gnu", x86_64_uwp_windows_gnu),
941942

943+
("aarch64-pc-windows-gnullvm", aarch64_pc_windows_gnullvm),
944+
("x86_64-pc-windows-gnullvm", x86_64_pc_windows_gnullvm),
945+
942946
("aarch64-pc-windows-msvc", aarch64_pc_windows_msvc),
943947
("aarch64-uwp-windows-msvc", aarch64_uwp_windows_msvc),
944948
("x86_64-pc-windows-msvc", x86_64_pc_windows_msvc),
+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
use crate::spec::{cvs, LinkArgs, LinkerFlavor, TargetOptions};
2+
3+
pub fn opts() -> TargetOptions {
4+
let pre_link_args = LinkArgs::from([(
5+
LinkerFlavor::Gcc,
6+
vec![
7+
// We cannot use `-nodefaultlibs` because compiler-rt has to be passed
8+
// as a path since it's not added to linker search path by the default.
9+
// There were attemts to make it behave like libgcc (so one can just use -l<name>)
10+
// but LLVM maintainers rejected it: https://reviews.llvm.org/D51440
11+
"-nolibc".into(),
12+
"--unwindlib=none".into(),
13+
],
14+
)]);
15+
let late_link_args = LinkArgs::from([(
16+
LinkerFlavor::Gcc,
17+
// Order of `late_link_args*` does not matter with LLD.
18+
vec![
19+
"-lmingw32".into(),
20+
"-lmingwex".into(),
21+
"-lmsvcrt".into(),
22+
"-lkernel32".into(),
23+
"-luser32".into(),
24+
],
25+
)]);
26+
27+
TargetOptions {
28+
os: "windows".into(),
29+
env: "gnu".into(),
30+
vendor: "pc".into(),
31+
abi: "llvm".into(),
32+
linker: Some("clang".into()),
33+
dynamic_linking: true,
34+
executables: true,
35+
dll_prefix: "".into(),
36+
dll_suffix: ".dll".into(),
37+
exe_suffix: ".exe".into(),
38+
families: cvs!["windows"],
39+
is_like_windows: true,
40+
allows_weak_linkage: false,
41+
pre_link_args,
42+
late_link_args,
43+
abi_return_struct_as_int: true,
44+
emit_debug_gdb_scripts: false,
45+
requires_uwtable: true,
46+
eh_frame_header: false,
47+
no_default_libraries: false,
48+
has_thread_local: true,
49+
50+
..Default::default()
51+
}
52+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
use crate::spec::{LinkerFlavor, Target};
2+
3+
pub fn target() -> Target {
4+
let mut base = super::windows_gnullvm_base::opts();
5+
base.cpu = "x86-64".into();
6+
let gcc_pre_link_args = base.pre_link_args.entry(LinkerFlavor::Gcc).or_default();
7+
gcc_pre_link_args.push("-m64".into());
8+
base.max_atomic_width = Some(64);
9+
base.linker = Some("x86_64-w64-mingw32-clang".into());
10+
11+
Target {
12+
llvm_target: "x86_64-pc-windows-gnu".into(),
13+
pointer_width: 64,
14+
data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
15+
.into(),
16+
arch: "x86_64".into(),
17+
options: base,
18+
}
19+
}

Diff for: library/unwind/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn main() {
3636
println!("cargo:rustc-link-lib=gcc_s");
3737
} else if target.contains("dragonfly") {
3838
println!("cargo:rustc-link-lib=gcc_pic");
39-
} else if target.contains("pc-windows-gnu") {
39+
} else if target.ends_with("pc-windows-gnu") {
4040
// This is handled in the target spec with late_link_args_[static|dynamic]
4141
} else if target.contains("uwp-windows-gnu") {
4242
println!("cargo:rustc-link-lib=unwind");

Diff for: library/unwind/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#![feature(nll)]
66
#![feature(staged_api)]
77
#![feature(c_unwind)]
8+
#![feature(cfg_target_abi)]
89
#![cfg_attr(not(target_env = "msvc"), feature(libc))]
910

1011
cfg_if::cfg_if! {
@@ -85,3 +86,7 @@ extern "C" {}
8586
#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
8687
#[link(name = "unwind", kind = "static", modifiers = "-bundle")]
8788
extern "C" {}
89+
90+
#[cfg(all(target_os = "windows", target_env = "gnu", target_abi = "llvm"))]
91+
#[link(name = "unwind", kind = "static", modifiers = "-bundle")]
92+
extern "C" {}

Diff for: src/bootstrap/compile.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ fn copy_third_party_objects(
175175
}
176176

177177
if target == "x86_64-fortanix-unknown-sgx"
178+
|| target.contains("pc-windows-gnullvm")
178179
|| builder.config.llvm_libunwind == LlvmLibunwind::InTree
179180
&& (target.contains("linux") || target.contains("fuchsia"))
180181
{
@@ -246,7 +247,7 @@ fn copy_self_contained_objects(
246247
DependencyType::TargetSelfContained,
247248
);
248249
}
249-
} else if target.contains("windows-gnu") {
250+
} else if target.ends_with("windows-gnu") {
250251
for obj in ["crt2.o", "dllcrt2.o"].iter() {
251252
let src = compiler_file(builder, builder.cc(target), target, CLang::C, obj);
252253
let target = libdir_self_contained.join(obj);
@@ -477,7 +478,7 @@ impl Step for StartupObjects {
477478
fn run(self, builder: &Builder<'_>) -> Vec<(PathBuf, DependencyType)> {
478479
let for_compiler = self.compiler;
479480
let target = self.target;
480-
if !target.contains("windows-gnu") {
481+
if !target.ends_with("windows-gnu") {
481482
return vec![];
482483
}
483484

Diff for: src/bootstrap/dist.rs

+11-9
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl Step for Mingw {
285285
/// without any extra installed software (e.g., we bundle gcc, libraries, etc).
286286
fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
287287
let host = self.host;
288-
if !host.contains("pc-windows-gnu") {
288+
if !host.ends_with("pc-windows-gnu") {
289289
return None;
290290
}
291291

@@ -341,7 +341,7 @@ impl Step for Rustc {
341341
// anything requiring us to distribute a license, but it's likely the
342342
// install will *also* include the rust-mingw package, which also needs
343343
// licenses, so to be safe we just include it here in all MinGW packages.
344-
if host.contains("pc-windows-gnu") {
344+
if host.ends_with("pc-windows-gnu") {
345345
make_win_dist(tarball.image_dir(), &tmpdir(builder), host, builder);
346346
tarball.add_dir(builder.src.join("src/etc/third-party"), "share/doc");
347347
}
@@ -1352,7 +1352,7 @@ impl Step for Extended {
13521352
tarballs.push(builder.ensure(Rustc { compiler: builder.compiler(stage, target) }));
13531353
tarballs.push(builder.ensure(Std { compiler, target }).expect("missing std"));
13541354

1355-
if target.contains("windows-gnu") {
1355+
if target.ends_with("windows-gnu") {
13561356
tarballs.push(builder.ensure(Mingw { host: target }).expect("missing mingw"));
13571357
}
13581358

@@ -1522,7 +1522,7 @@ impl Step for Extended {
15221522
prepare(tool);
15231523
}
15241524
}
1525-
if target.contains("windows-gnu") {
1525+
if target.ends_with("windows-gnu") {
15261526
prepare("rust-mingw");
15271527
}
15281528

@@ -1711,7 +1711,7 @@ impl Step for Extended {
17111711
.arg("-t")
17121712
.arg(etc.join("msi/remove-duplicates.xsl")),
17131713
);
1714-
if target.contains("windows-gnu") {
1714+
if target.ends_with("windows-gnu") {
17151715
builder.run(
17161716
Command::new(&heat)
17171717
.current_dir(&exe)
@@ -1760,7 +1760,7 @@ impl Step for Extended {
17601760
if built_tools.contains("miri") {
17611761
cmd.arg("-dMiriDir=miri");
17621762
}
1763-
if target.contains("windows-gnu") {
1763+
if target.ends_with("windows-gnu") {
17641764
cmd.arg("-dGccDir=rust-mingw");
17651765
}
17661766
builder.run(&mut cmd);
@@ -1787,7 +1787,7 @@ impl Step for Extended {
17871787
}
17881788
candle("AnalysisGroup.wxs".as_ref());
17891789

1790-
if target.contains("windows-gnu") {
1790+
if target.ends_with("windows-gnu") {
17911791
candle("GccGroup.wxs".as_ref());
17921792
}
17931793

@@ -1829,7 +1829,7 @@ impl Step for Extended {
18291829
cmd.arg("MiriGroup.wixobj");
18301830
}
18311831

1832-
if target.contains("windows-gnu") {
1832+
if target.ends_with("windows-gnu") {
18331833
cmd.arg("GccGroup.wixobj");
18341834
}
18351835
// ICE57 wrongly complains about the shortcuts
@@ -1859,7 +1859,9 @@ fn add_env(builder: &Builder<'_>, cmd: &mut Command, target: TargetSelection) {
18591859
.env("CFG_BUILD", target.triple)
18601860
.env("CFG_CHANNEL", &builder.config.channel);
18611861

1862-
if target.contains("windows-gnu") {
1862+
if target.contains("windows-gnullvm") {
1863+
cmd.env("CFG_MINGW", "1").env("CFG_ABI", "LLVM");
1864+
} else if target.contains("windows-gnu") {
18631865
cmd.env("CFG_MINGW", "1").env("CFG_ABI", "GNU");
18641866
} else {
18651867
cmd.env("CFG_MINGW", "0").env("CFG_ABI", "MSVC");

Diff for: src/bootstrap/native.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1372,6 +1372,10 @@ impl Step for Libunwind {
13721372
cfg.define("__LIBUNWIND_IS_NATIVE_ONLY", None);
13731373
cfg.define("NDEBUG", None);
13741374
}
1375+
if self.target.contains("windows") {
1376+
cfg.define("_LIBUNWIND_HIDE_SYMBOLS", "1");
1377+
cfg.define("_LIBUNWIND_IS_NATIVE_ONLY", "1");
1378+
}
13751379
}
13761380

13771381
cc_cfg.compiler(builder.cc(self.target));

Diff for: src/doc/rustc/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- [m68k-unknown-linux-gnu](platform-support/m68k-unknown-linux-gnu.md)
2222
- [mips64-openwrt-linux-musl](platform-support/mips64-openwrt-linux-musl.md)
2323
- [nvptx64-nvidia-cuda](platform-support/nvptx64-nvidia-cuda.md)
24+
- [*-pc-windows-gnullvm](platform-support/pc-windows-gnullvm.md)
2425
- [*-unknown-openbsd](platform-support/openbsd.md)
2526
- [wasm64-unknown-unknown](platform-support/wasm64-unknown-unknown.md)
2627
- [x86_64-unknown-none](platform-support/x86_64-unknown-none.md)

Diff for: src/doc/rustc/src/platform-support.md

+2
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ target | std | host | notes
208208
`aarch64-apple-ios-macabi` | ? | | Apple Catalyst on ARM64
209209
`aarch64-apple-tvos` | * | | ARM64 tvOS
210210
[`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ | | ARM64 SOLID with TOPPERS/ASP3
211+
[`aarch64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
211212
`aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
212213
`aarch64-unknown-hermit` | ✓ | | ARM64 HermitCore
213214
`aarch64-unknown-uefi` | * | | ARM64 UEFI
@@ -288,6 +289,7 @@ target | std | host | notes
288289
[`wasm64-unknown-unknown`](platform-support/wasm64-unknown-unknown.md) | ? | | WebAssembly
289290
`x86_64-apple-ios-macabi` | ✓ | | Apple Catalyst on x86_64
290291
`x86_64-apple-tvos` | * | | x86 64-bit tvOS
292+
[`x86_64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
291293
`x86_64-pc-windows-msvc` | * | | 64-bit Windows XP support
292294
`x86_64-sun-solaris` | ? | | Deprecated target for 64-bit Solaris 10/11, illumos
293295
`x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 avaiable 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 corss 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 avaiable 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)

0 commit comments

Comments
 (0)