From fcf21b2b2e02762671e12b277efee7a911a03923 Mon Sep 17 00:00:00 2001 From: Dexoron Date: Tue, 7 Jul 2026 11:22:00 +0800 Subject: [PATCH] New translations cross-compilation.mdx (Ukrainian) [ci skip] --- .../docs/reference/cross-compilation.mdx.mdx | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 docs-crowdin-export/uk-UA/docs/reference/cross-compilation.mdx.mdx diff --git a/docs-crowdin-export/uk-UA/docs/reference/cross-compilation.mdx.mdx b/docs-crowdin-export/uk-UA/docs/reference/cross-compilation.mdx.mdx new file mode 100644 index 0000000..352170f --- /dev/null +++ b/docs-crowdin-export/uk-UA/docs/reference/cross-compilation.mdx.mdx @@ -0,0 +1,70 @@ +--- +sidebar_label: Cross-compilation +--- + +# Cross-Compilation + +## Short Names + +DCR supports short platform names: + +| Short Name | Full Triple | +| ---------- | -------------------------- | +| `linux` | `x86_64-unknown-linux-gnu` | +| `macos` | `x86_64-apple-darwin` | +| `windows` | `x86_64-pc-windows-msvc` | + +```bash +dcr build --target windows +``` + +## Full Triples + +```bash +dcr build --target aarch64-unknown-linux-gnu +dcr build --target x86_64-pc-windows-gnu # mingw +dcr build --target armv7-unknown-linux-gnueabihf +``` + +## clang --target + +When using clang, DCR injects `--target=\` into CFLAGS. + +```toml +[build] +compiler = "clang" +target = "aarch64-unknown-linux-gnu" +# Auto: cflags += ["--target=aarch64-unknown-linux-gnu"] +``` + +## Bare-Metal / Freestanding + +For targets containing `none`, `-elf`, `eabi`, or `baremetal`, DCR automatically: + +1. **Disables default flags** — no system include paths, no `-l` libc +2. **Injects `-ffreestanding`** at compile time and `-nostdlib -static` at link time + +You can also enable freestanding mode explicitly: + +```toml +[build] +freestanding = true +``` + +```bash +dcr build --target aarch64-none-elf +``` + +## Target Directory + +On Linux with explicit target: + +``` +target/// +``` + +On macOS/Windows or without target: + +``` +target// +```