Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/build-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,21 @@ up to 50%. But the effects vary widely and depend on the characteristics of the
code and its build configuration, and for some programs there is no compile
time improvement.

### Codegen backend
You can use a different codegen backend to reduce compile times. Currently,
the Cranelift codegen backend is available in the nightly chanel for Linux x64 and 64-bit ARM targets.

You can install it with this `rustup` command:
```bash
$ rustup component add rustc-codegen-cranelift-preview --toolchain nightly
```

And then use it with one of the following commands:
- `RUSTFLAGS="-Zcodegen-backend=cranelift" cargo +nightly build`
- `CARGO_PROFILE_DEV_CODEGEN_BACKEND=cranelift cargo +nightly build -Zcodegen-backend`

You can find more information about this codegen backend [here](https://github.com/rust-lang/rustc_codegen_cranelift).

## Custom profiles

In addition to the `dev` and `release` profiles, Cargo supports [custom
Expand Down