Move --sysroot
argument out of the argument file to fix miri issue
This commit is contained in:
parent
42198bf562
commit
8c219af8bf
@ -67,9 +67,6 @@ pub(crate) fn generate_args_file(file_path: &Path, options: &RustdocOptions) ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(sysroot) = &options.maybe_sysroot {
|
|
||||||
content.push(format!("--sysroot={}", sysroot.display()));
|
|
||||||
}
|
|
||||||
for lib_str in &options.lib_strs {
|
for lib_str in &options.lib_strs {
|
||||||
content.push(format!("-L{lib_str}"));
|
content.push(format!("-L{lib_str}"));
|
||||||
}
|
}
|
||||||
@ -411,6 +408,10 @@ fn run_test(
|
|||||||
|
|
||||||
compiler.arg(&format!("@{}", rustdoc_options.arg_file.display()));
|
compiler.arg(&format!("@{}", rustdoc_options.arg_file.display()));
|
||||||
|
|
||||||
|
if let Some(sysroot) = &rustdoc_options.maybe_sysroot {
|
||||||
|
compiler.arg(format!("--sysroot={}", sysroot.display()));
|
||||||
|
}
|
||||||
|
|
||||||
compiler.arg("--edition").arg(&edition.to_string());
|
compiler.arg("--edition").arg(&edition.to_string());
|
||||||
compiler.env("UNSTABLE_RUSTDOC_TEST_PATH", path);
|
compiler.env("UNSTABLE_RUSTDOC_TEST_PATH", path);
|
||||||
compiler.env("UNSTABLE_RUSTDOC_TEST_LINE", format!("{}", line as isize - line_offset as isize));
|
compiler.env("UNSTABLE_RUSTDOC_TEST_LINE", format!("{}", line as isize - line_offset as isize));
|
||||||
@ -950,6 +951,7 @@ pub(crate) struct IndividualTestOptions {
|
|||||||
runtool_args: Vec<String>,
|
runtool_args: Vec<String>,
|
||||||
target: TargetTriple,
|
target: TargetTriple,
|
||||||
test_id: String,
|
test_id: String,
|
||||||
|
maybe_sysroot: Option<PathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IndividualTestOptions {
|
impl IndividualTestOptions {
|
||||||
@ -982,6 +984,7 @@ fn new(options: &RustdocOptions, arg_file: &Path, test_id: String) -> Self {
|
|||||||
runtool_args: options.runtool_args.clone(),
|
runtool_args: options.runtool_args.clone(),
|
||||||
target: options.target.clone(),
|
target: options.target.clone(),
|
||||||
test_id,
|
test_id,
|
||||||
|
maybe_sysroot: options.maybe_sysroot.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user