Skip to content

Commit e8e7555

Browse files
authored
Rollup merge of #97021 - Volker-Weissmann:patch-1, r=Dylan-DPC
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
2 parents f8832c2 + 30108ca commit e8e7555

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/doc/unstable-book/src/compiler-flags/sanitizer.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ This feature allows for use of one of following sanitizers:
2222

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

2730
# AddressSanitizer
2831

0 commit comments

Comments
 (0)