# docs: Add troubleshooting section warning about RUSTFLAGS env var \(\#23354\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/3c0acdea5e4605069a98ba896ab2b104e8cf028f)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 3c0acdea5e4605069a98ba896ab2b104e8cf028f

Requested commit: 3c0acdea5e4605069a98ba896ab2b104e8cf028f

Commit: 3c0acdea5e4605069a98ba896ab2b104e8cf028f

Tree: 6e0b1d8ab65d2e68de0dd42055752a9df481d36d

Author: Cherry

Committer: GitHub

## Message

```
docs: Add troubleshooting section warning about RUSTFLAGS env var (#23354)

According to #23223, manually setting `RUSTFLAGS` env var overrides
settings in `.cargo/config.toml`. Since users possibly may set their own
`RUSTFLAGS` when building, this creates an avenue where builds may fail
for really strange reasons that are difficult to debug.

This PR adds notes to the troubleshooting section to avoid setting
`RUSTFLAGS`, and offers alternatives which do not conflict.

This problem most recently affected nightly CI builders since we had
been setting `RUSTFLAGS` in our workflows to enable custom things like
gles or compiling with a specific target cpu. PR #23117 caused builds to
fail unless they were compiled with `-C target-feature=+crt-static`,
which due to this issue the `RUSTFLAGS` env var we set overrode the
`config.toml` compile flags, causing our builds to fail.

Release Notes:

- N/A
```

## Parents

- [36c7b3eb9130fc7954458a74fa075d18e4647794](https://git.cafe/gitcafe/zed/commit/36c7b3eb9130fc7954458a74fa075d18e4647794?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/3c0acdea5e4605069a98ba896ab2b104e8cf028f?format=markdown)
