Skip to content

Commit

Permalink
Rollup merge of #97021 - Volker-Weissmann:patch-1, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Added note in documentation

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
Dylan-DPC authored May 15, 2022
2 parents f8832c2 + 30108ca commit e8e7555
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 e8e7555

Please sign in to comment.