about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbit-aloo <sshourya17@gmail.com>2025-06-24 20:33:18 +0530
committerbit-aloo <sshourya17@gmail.com>2025-06-27 10:38:07 +0530
commit2cf6552f5dbbb4c09543a6eabe45b7133a3312fe (patch)
tree6fe1060dedc42150614daa758a4ed5a8a0d8f06d /src/bootstrap
parent5291c9fcec04436d08fd5689202ff574fd813488 (diff)
downloadrust-2cf6552f5dbbb4c09543a6eabe45b7133a3312fe.tar.gz
rust-2cf6552f5dbbb4c09543a6eabe45b7133a3312fe.zip
add new command state in execution context
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/utils/execution_context.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bootstrap/src/utils/execution_context.rs b/src/bootstrap/src/utils/execution_context.rs
index 3630ef4dd97..569fc816b93 100644
--- a/src/bootstrap/src/utils/execution_context.rs
+++ b/src/bootstrap/src/utils/execution_context.rs
@@ -29,6 +29,17 @@ pub struct CommandCache {
     cache: Mutex<HashMap<CommandCacheKey, CommandOutput>>,
 }
 
+enum CommandState<'a> {
+    Cached(CommandOutput),
+    Deferred {
+        process: Option<Result<Child, std::io::Error>>,
+        command: &'a mut BootstrapCommand,
+        stdout: OutputMode,
+        stderr: OutputMode,
+        executed_at: &'a Location<'a>,
+    },
+}
+
 impl CommandCache {
     pub fn new() -> Self {
         Self { cache: Mutex::new(HashMap::new()) }