Skip to content

Commit b0d0cc6

Browse files
Add Cc::output method
1 parent dcc9a8f commit b0d0cc6

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)