Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/5] rust: Fix bloat issue in recent rust updates
@ 2025-03-21 13:24 Deepesh.Varatharajan
  2025-03-21 13:24 ` [PATCH 2/5] rust: Fix build failure when multilibs are enabled Deepesh.Varatharajan
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Deepesh.Varatharajan @ 2025-03-21 13:24 UTC (permalink / raw)
  To: openembedded-core
  Cc: Shivaprasad.Moodalappa, Sundeep.Kokkonda, Deepesh.Varatharajan

From: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>

Remove the "src/gcc" directory from the Rust source code to reduce the
filesystem build space.

In Rust 1.83 (and 1.84), a full GCC-14 tree was included, which caused
the tar.xz archive to increase by 128 MB and the unpacked sources to
grow by 1.3 GB. This was an upstream error that has been resolved in
Rust 1.85.

After updating to Rust 1.85 we can revert this removal of "gcc/src"

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
---
 meta/recipes-devtools/rust/rust_1.83.0.bb | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/recipes-devtools/rust/rust_1.83.0.bb b/meta/recipes-devtools/rust/rust_1.83.0.bb
index cd470b1883..aaf35692ab 100644
--- a/meta/recipes-devtools/rust/rust_1.83.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.83.0.bb
@@ -50,6 +50,16 @@ setup_cargo_environment () {
 
 inherit rust-target-config
 
+do_unpack:append() {
+    import os
+    import shutil
+
+    # Remove gcc directory after unpacking
+    gcc_dir = os.path.join(d.getVar('S'), 'src', 'gcc')
+    if os.path.isdir(gcc_dir):
+        shutil.rmtree(gcc_dir)
+}
+
 do_rust_setup_snapshot () {
     for installer in "${UNPACKDIR}/rust-snapshot-components/"*"/install.sh"; do
         "${installer}" --prefix="${WORKDIR}/rust-snapshot" --disable-ldconfig
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-03-27  6:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-21 13:24 [PATCH 1/5] rust: Fix bloat issue in recent rust updates Deepesh.Varatharajan
2025-03-21 13:24 ` [PATCH 2/5] rust: Fix build failure when multilibs are enabled Deepesh.Varatharajan
2025-03-24  9:23   ` [OE-core] " Alexander Kanavin
2025-03-24 17:48     ` Randy MacLeod
2025-03-25  8:35       ` Deepesh Varatharajan
2025-03-27  6:26       ` Deepesh Varatharajan
2025-03-25  4:44     ` Deepesh Varatharajan
2025-03-21 13:24 ` [PATCH 3/5] rust: Fix build break because of "download-rustc" and "llvm-tools" Deepesh.Varatharajan
2025-03-21 13:24 ` [PATCH 4/5] rust: Upgrade 1.83.0->1.84.1 Deepesh.Varatharajan
2025-03-21 13:24 ` [PATCH 5/5] rust: Oe-selftest changes for rust v1.84.1 Deepesh.Varatharajan
2025-03-22  6:50 ` [OE-core] [PATCH 1/5] rust: Fix bloat issue in recent rust updates Khem Raj
2025-03-24 22:28 ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox