From 34acc9cb04bae1f8446b2fbf17d6eb3a9019c65f Mon Sep 17 00:00:00 2001
From: bjorn3 <17426603+bjorn3@users.noreply.github.com>
Date: Wed, 10 Jan 2024 15:19:06 +0100
Subject: [PATCH] Don't checkout rust submodule by default

It is no longer necessary for regular builds as of the previous commit.
This will drastically improve the time it takes to do the initial clone
of redox.
---
 .gitmodules  | 1 +
 mk/prefix.mk | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/.gitmodules b/.gitmodules
index 3f4d88a8b..a43afd30d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -10,6 +10,7 @@
 	path = rust
 	url = https://gitlab.redox-os.org/redox-os/rust.git
 	branch = redox-2023-09-07
+	update = none
 [submodule "redoxfs"]
 	path = redoxfs
 	url = https://gitlab.redox-os.org/redox-os/redoxfs.git
diff --git a/mk/prefix.mk b/mk/prefix.mk
index 74c97e618..9b84b3e0f 100644
--- a/mk/prefix.mk
+++ b/mk/prefix.mk
@@ -73,6 +73,9 @@ $(PREFIX)/rust-install: $(PREFIX)/rust-install.tar.gz
 
 else
 
+$(ROOT)/rust:
+	git submodule update --init --recursive --checkout rust
+
 PREFIX_BASE_INSTALL=$(PREFIX)/rust-freestanding-install
 PREFIX_FREESTANDING_INSTALL=$(PREFIX)/gcc-freestanding-install
 
-- 
GitLab