From 0132adc176c193fe9a1319a2a754306f2d438500 Mon Sep 17 00:00:00 2001 From: Tor Hovland Date: Sun, 4 Apr 2021 13:35:04 +0200 Subject: [PATCH] Emitted files go to the output dir. --- compiler/rustc_session/src/config.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 52cd8638b00..034aebe42c1 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -611,7 +611,14 @@ pub fn path(&self, flavor: OutputType) -> PathBuf { .get(&flavor) .and_then(|p| p.to_owned()) .or_else(|| self.single_output_file.clone()) - .unwrap_or_else(|| self.temp_path(flavor, None)) + .unwrap_or_else(|| self.output_path(flavor)) + } + + /// Gets the output path where a compilation artifact of the given type + /// should be placed on disk. + pub fn output_path(&self, flavor: OutputType) -> PathBuf { + let extension = flavor.extension(); + self.with_directory_and_extension(&self.out_directory, &extension) } /// Gets the path where a compilation artifact of the given type for the -- 2.44.0