Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Deepesh.Varatharajan@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: Shivaprasad.Moodalappa@windriver.com,
	Sundeep.Kokkonda@windriver.com,
	Deepesh.Varatharajan@windriver.com
Subject: [PATCH 1/5] rust: Fix bloat issue in recent rust updates
Date: Fri, 21 Mar 2025 06:24:52 -0700	[thread overview]
Message-ID: <20250321132502.2607941-1-Deepesh.Varatharajan@windriver.com> (raw)

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



             reply	other threads:[~2025-03-21 13:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 13:24 Deepesh.Varatharajan [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250321132502.2607941-1-Deepesh.Varatharajan@windriver.com \
    --to=deepesh.varatharajan@windriver.com \
    --cc=Shivaprasad.Moodalappa@windriver.com \
    --cc=Sundeep.Kokkonda@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox