summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorDeepesh Varatharajan <Deepesh.Varatharajan@windriver.com>2025-03-27 02:06:03 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-27 13:41:58 +0000
commit2cb5d1accca23df67dd55d01416ea404ab92683b (patch)
tree1d67d236ba5cb19bec360d5e97e6060b350f64b1 /meta/recipes-devtools
parent43a2be28972efb5327e91bfc0a460de1ce874cf5 (diff)
downloadpoky-2cb5d1accca23df67dd55d01416ea404ab92683b.tar.gz
rust: Fix bloat issue in recent rust updates
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 "src/gcc" (From OE-Core rev: 26a345adc8e050657bfa0b51ea92a3d89e698d9a) Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/rust/rust-source.inc11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index 838544e089..40fc237a62 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -13,6 +13,17 @@ SRC_URI[rust.sha256sum] = "7b11d4242dab0921a7d54758ad3fe805153c979c144625fecde11
13 13
14RUSTSRC = "${WORKDIR}/rustc-${RUST_VERSION}-src" 14RUSTSRC = "${WORKDIR}/rustc-${RUST_VERSION}-src"
15 15
16#After updating to Rust 1.85 we can revert this removal of "src/gcc"
17remove_gcc_directory() {
18 # Ensure the gcc directory exists
19 gcc_dir="${S}/src/gcc"
20 if [ -d "$gcc_dir" ]; then
21 rm -rf "$gcc_dir"
22 fi
23}
24# Add postfunc to the do_unpack task
25do_unpack[postfuncs] += "remove_gcc_directory"
26
16UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html" 27UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html"
17UPSTREAM_CHECK_REGEX = "rustc-(?P<pver>\d+(\.\d+)+)-src" 28UPSTREAM_CHECK_REGEX = "rustc-(?P<pver>\d+(\.\d+)+)-src"
18 29