Skip to content

Commit e6011b0

Browse files
committed
doc(unstable): profile-rustflags and codegen-backend in config.toml
1 parent 629f763 commit e6011b0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/doc/src/reference/unstable.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,18 @@ cargo-features = ["profile-rustflags"]
681681
rustflags = [ "-C", "..." ]
682682
```
683683

684+
To set this in a profile in Cargo configuration, you need to use either
685+
`-Z profile-rustflags` or `[unstable]` table to enable it. For example,
686+
687+
```toml
688+
# .cargo/config.toml
689+
[unstable]
690+
profile-rustflags = true
691+
692+
[profile.release]
693+
rustflags = [ "-C", "..." ]
694+
```
695+
684696
### rustdoc-map
685697
* Tracking Issue: [#8296](https://github.com/rust-lang/cargo/issues/8296)
686698

@@ -1378,6 +1390,18 @@ serde = "1.0.117"
13781390
codegen-backend = "cranelift"
13791391
```
13801392

1393+
To set this in a profile in Cargo configuration, you need to use either
1394+
`-Z codegen-backend` or `[unstable]` table to enable it. For example,
1395+
1396+
```toml
1397+
# .cargo/config.toml
1398+
[unstable]
1399+
codegen-backend = true
1400+
1401+
[profile.dev.package.foo]
1402+
codegen-backend = "cranelift"
1403+
```
1404+
13811405
### patch-in-config
13821406

13831407
The `-Z patch-in-config` flag, and the corresponding support for

0 commit comments

Comments
 (0)