Rewrite emit, mixing-formats and bare-outfile run-make tests in rmake.rs format by Oneirical · Pull Request #125383 · rust-lang/rust (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that rustc() will always pass through the function I copied below (I think you wrote it). So, logically, we wouldn't need to specify the --out-dir tmp_dir(), as it's already set?

I'm not too sure I understand your suggestion. In rustc().out_dir("foo").output("foo"), .out_dir("foo") is setting the file name foo as the output directory, but it's a filename, not a directory. I could certainly rename output to output_filename, but that would require replacing every instance of it in already ported tests.

fn setup_common() -> Command { let rustc = env::var("RUSTC").unwrap(); let mut cmd = Command::new(rustc); set_host_rpath(&mut cmd); cmd.arg("--out-dir").arg(tmp_dir()).arg("-L").arg(tmp_dir()); cmd }