Skip to content

Commit 4d3772b

Browse files
committed
Add a note about passing in rustflags that conflict with Cargo.
1 parent 2d08c73 commit 4d3772b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/doc/src/reference/config.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ Without `--target`, the flags will be passed to all compiler invocations
349349
you have args that you do not want to pass to build scripts or proc macros and
350350
are building for the host, pass `--target` with the host triple.
351351

352+
It is not recommended to pass in flags that Cargo itself usually manages. For
353+
example, the flags driven by [profiles] are best handled by setting the
354+
appropriate profile setting.
355+
352356
> **Caution**: Due to the low-level nature of passing flags directly to the
353357
> compiler, this may cause a conflict with future versions of Cargo which may
354358
> issue the same or similar flags on its own which may interfere with the

0 commit comments

Comments
 (0)