rustdoc: forward -Z options to rustc

Currently rustdoc does not forward `-Z` options to rustc when building
test executables. This makes impossible to use rustdoc to run test
samples when crate under test is instrumented with one of sanitizers
`-Zsanitizer=...`, since the final linking step will not include
sanitizer runtime library.

Forward `-Z` options to rustc to solve the issue.

Helps with #43031.
This commit is contained in:
Tomasz Miąsko
2019-10-11 00:00:00 +00:00
parent 000d90b11f
commit 5db17335a1
6 changed files with 39 additions and 15 deletions

View File

@@ -7,10 +7,10 @@ failures:
---- $DIR/failed-doctest-output.rs - OtherStruct (line 21) stdout ----
error[E0425]: cannot find value `no` in this scope
--> $DIR/failed-doctest-output.rs:22:1
|
3 | no
| ^^ not found in this scope
--> $DIR/failed-doctest-output.rs:22:1
|
LL | no
| ^^ not found in this scope
error: aborting due to previous error