about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2024-10-07 11:30:18 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2024-10-07 16:30:00 +0000
commitb577b26249826cdd8a2aa1bdafbe7d5a58ec98fd (patch)
treee0ceea878fb307661affa52c4e9ad531ed2193b6 /src
parentad7d41ce90a78dea19b6dffe8aad22ce7b9be32f (diff)
downloadrust-b577b26249826cdd8a2aa1bdafbe7d5a58ec98fd.tar.gz
rust-b577b26249826cdd8a2aa1bdafbe7d5a58ec98fd.zip
Add stdio configuring to run-make Rustc
Diffstat (limited to 'src')
-rw-r--r--src/tools/run-make-support/src/macros.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/tools/run-make-support/src/macros.rs b/src/tools/run-make-support/src/macros.rs
index f7fe4f54223..be71470321c 100644
--- a/src/tools/run-make-support/src/macros.rs
+++ b/src/tools/run-make-support/src/macros.rs
@@ -70,6 +70,30 @@ macro_rules! impl_common_helpers {
                 self
             }
 
+            /// Configuration for the child process’s standard input (stdin) handle.
+            ///
+            /// See [`std::process::Command::stdin`].
+            pub fn stdin<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self {
+                self.cmd.stdin(cfg);
+                self
+            }
+
+            /// Configuration for the child process’s standard output (stdout) handle.
+            ///
+            /// See [`std::process::Command::stdout`].
+            pub fn stdout<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self {
+                self.cmd.stdout(cfg);
+                self
+            }
+
+            /// Configuration for the child process’s standard error (stderr) handle.
+            ///
+            /// See [`std::process::Command::stderr`].
+            pub fn stderr<T: Into<Stdio>>(&mut self, cfg: T) -> &mut Self {
+                self.cmd.stderr(cfg);
+                self
+            }
+
             /// Inspect what the underlying [`Command`] is up to the
             /// current construction.
             pub fn inspect<I>(&mut self, inspector: I) -> &mut Self