mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 14:28:30 +00:00
Introduce `--mirror` and `DCRUP_MIRROR` so `dcrup` can fetch prebuilt binaries from multiple CDNs. Default `auto` tries cf → gh → sf → ya and uses the first successful download. - dcrup.sh / dcrup.ps1: mirror chain, CLI flag, env override - remove install.sh / install.ps1 / install_bsd.sh (superseded by dcrup) - GitHub Actions: upload releases to Cloudflare R2 next to Yandex S3 - docs: README, FAQ, changelog, installation, env vars, contributing
84 lines
1.5 KiB
Plaintext
84 lines
1.5 KiB
Plaintext
---
|
|
sidebar_label: Environment variables
|
|
---
|
|
|
|
# Environment Variables
|
|
|
|
## DCR_COMPILER
|
|
|
|
Overrides the compiler for all languages. **Highest priority.**
|
|
|
|
```bash
|
|
export DCR_COMPILER=clang
|
|
dcr build
|
|
```
|
|
|
|
Compiler resolution priority:
|
|
1. `DCR_COMPILER` (env)
|
|
2. `DCR_CC` / `DCR_CXX` / `DCR_AS` (env)
|
|
3. `[toolchain]` (dcr.toml)
|
|
4. `build.compiler` (dcr.toml)
|
|
5. `PATH`
|
|
|
|
## DCR_CC / DCR_CXX / DCR_AS
|
|
|
|
Per-language override (lower priority than `DCR_COMPILER`, higher than `[toolchain]`).
|
|
|
|
```bash
|
|
export DCR_CC=gcc-14
|
|
export DCR_CXX=g++-14
|
|
export DCR_AS=arm-linux-gnueabihf-as
|
|
```
|
|
|
|
## DCR_LD / DCR_AR
|
|
|
|
Override linker and archiver.
|
|
|
|
```bash
|
|
export DCR_LD=ld.lld
|
|
export DCR_AR=llvm-ar
|
|
```
|
|
|
|
## DCR_DEBUG
|
|
|
|
Enables debug mode — prints all compilation commands to stderr before execution.
|
|
|
|
```bash
|
|
export DCR_DEBUG=1
|
|
dcr build
|
|
```
|
|
|
|
## DCR_INDEX_PATH
|
|
|
|
Overrides the path to the registry `index.json`.
|
|
|
|
```bash
|
|
export DCR_INDEX_PATH=/custom/path/index.json
|
|
```
|
|
|
|
Default: `~/.dcr/index.json`.
|
|
|
|
## DCRUP_MIRROR
|
|
|
|
Download mirror for `dcrup` (prebuilt binaries only).
|
|
|
|
```bash
|
|
export DCRUP_MIRROR=auto # cf → gh → sf → ya (default)
|
|
export DCRUP_MIRROR=cf # CloudFlare CDN
|
|
export DCRUP_MIRROR=gh # GitHub Releases
|
|
export DCRUP_MIRROR=sf # SourceForge
|
|
export DCRUP_MIRROR=ya # Yandex CDN (RU fallback)
|
|
```
|
|
|
|
CLI override: `dcrup install stable --mirror cf`.
|
|
|
|
## DCRUP_HOME / DCRUP_BIN / DCRUP_REPO
|
|
|
|
Installer layout and source clone URL:
|
|
|
|
```bash
|
|
export DCRUP_HOME=~/.dcr
|
|
export DCRUP_BIN=~/.dcr/bin
|
|
export DCRUP_REPO=https://github.com/dexoron/dcr
|
|
```
|