Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2ecb08a

Browse files
committedMay 30, 2024
Add Cc::output method
1 parent 91c0823 commit 2ecb08a

File tree

1 file changed

+7
-0
lines changed
  • src/tools/run-make-support/src

1 file changed

+7
-0
lines changed
 

‎src/tools/run-make-support/src/cc.rs

+7
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ impl Cc {
8080
self
8181
}
8282

83+
/// Specify path of the output binary.
84+
pub fn output<P: AsRef<Path>>(&mut self, path: P) -> &mut Self {
85+
self.cmd.arg("-o");
86+
self.cmd.arg(path.as_ref());
87+
self
88+
}
89+
8390
/// Get the [`Output`][::std::process::Output] of the finished process.
8491
pub fn command_output(&mut self) -> ::std::process::Output {
8592
self.cmd.output().expect("failed to get output of finished process")

0 commit comments

Comments
 (0)
Failed to load comments.