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:
@@ -279,6 +279,9 @@ fn run_test(
|
||||
for codegen_options_str in &options.codegen_options_strs {
|
||||
compiler.arg("-C").arg(&codegen_options_str);
|
||||
}
|
||||
for debugging_option_str in &options.debugging_options_strs {
|
||||
compiler.arg("-Z").arg(&debugging_option_str);
|
||||
}
|
||||
if no_run {
|
||||
compiler.arg("--emit=metadata");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user