Skip to content

Commit

Permalink
Added note in documentation
Browse files Browse the repository at this point in the history
I added this note, because if you forget the `--target` flags, you get a really ugly error message.
rust-lang/cargo#10666
  • Loading branch information
Volker-Weissmann authored May 13, 2022
1 parent a7d6408 commit 30108ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/doc/unstable-book/src/compiler-flags/sanitizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ This feature allows for use of one of following sanitizers:

To enable a sanitizer compile with `-Zsanitizer=address`,`-Zsanitizer=cfi`,
`-Zsanitizer=hwaddress`, `-Zsanitizer=leak`, `-Zsanitizer=memory`,
`-Zsanitizer=memtag`, or `-Zsanitizer=thread`.
`-Zsanitizer=memtag`, or `-Zsanitizer=thread`. You might also need the `--target` and `build-std` flags. Example:
```shell
$ RUSTFLAGS=-Zsanitizer=address cargo build -Zbuild-std --target x86_64-unknown-linux-gnu
```

# AddressSanitizer

Expand Down

0 comments on commit 30108ca

Please sign in to comment.