]> git.lizzy.rs Git - rust.git/commitdiff
Emitted files go to the output dir.
authorTor Hovland <tor.hovland@bekk.no>
Sun, 4 Apr 2021 11:35:04 +0000 (13:35 +0200)
committerTor Hovland <tor.hovland@bekk.no>
Tue, 2 Nov 2021 21:43:49 +0000 (22:43 +0100)
compiler/rustc_session/src/config.rs

index 52cd8638b0083b9435f4028e4442204086c2978d..034aebe42c1fa237931dc5d9b748504a6fb20f43 100644 (file)
@@ -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