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

@ -6,13 +6,13 @@ failures:
---- $DIR/failed-doctest-missing-codes.rs - Foo (line 8) stdout ----
error[E0308]: mismatched types
--> $DIR/failed-doctest-missing-codes.rs:9:13
|
3 | let x: () = 5i32;
| ^^^^ expected (), found i32
|
= note: expected type `()`
found type `i32`
--> $DIR/failed-doctest-missing-codes.rs:9:13
|
LL | let x: () = 5i32;
| ^^^^ expected (), found i32
|
= note: expected type `()`
found type `i32`
error: aborting due to previous error