summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py2
-rw-r--r--meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch26
-rw-r--r--meta/recipes-devtools/rust/rust-source.inc1
-rw-r--r--meta/recipes-devtools/rust/rust_1.75.0.bb1
4 files changed, 28 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 5460f158e5..3d3f30eebc 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -16,8 +16,6 @@ import os
16import datetime 16import datetime
17 17
18exclude_packages = [ 18exclude_packages = [
19 'rust-rustdoc',
20 'rust-dbg'
21 ] 19 ]
22 20
23def is_excluded(package): 21def is_excluded(package):
diff --git a/meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch b/meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch
new file mode 100644
index 0000000000..0aab8772eb
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch
@@ -0,0 +1,26 @@
1rust: rustdoc reproducibility issue fix
2
3rust: rustdoc reproducibility issue fix
4
5The 'codegen-units' option split the crate into multiple compilation units for parallel compilation. Currently, this split is causing the rustdoc to generate differnt binary between the builds.
6To fix this the codegen-units & the lto options are disabled.
7
8More info about options:
9https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units
10https://doc.rust-lang.org/rustc/codegen-options/index.html#lto
11
12Upstream-Status: Inappropriate [oe specific]
13
14Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
15---
16--- a/.cargo/config.toml
17+++ b/.cargo/config.toml
18@@ -3,3 +3,7 @@
19
20 [source.vendored-sources]
21 directory = "vendor"
22+
23+[profile.release]
24+codegen-units = 1
25+
26
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index 20ef5e82bc..facf6eb346 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -13,6 +13,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
13 file://0001-Handle-vendored-sources-when-remapping-paths.patch;patchdir=${RUSTSRC} \ 13 file://0001-Handle-vendored-sources-when-remapping-paths.patch;patchdir=${RUSTSRC} \
14 file://repro-issue-fix-with-v175.patch;patchdir=${RUSTSRC} \ 14 file://repro-issue-fix-with-v175.patch;patchdir=${RUSTSRC} \
15 file://0001-cargo-do-not-write-host-information-into-compilation.patch;patchdir=${RUSTSRC} \ 15 file://0001-cargo-do-not-write-host-information-into-compilation.patch;patchdir=${RUSTSRC} \
16 file://rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch;patchdir=${RUSTSRC} \
16" 17"
17SRC_URI[rust.sha256sum] = "4526f786d673e4859ff2afa0bab2ba13c918b796519a25c1acce06dba9542340" 18SRC_URI[rust.sha256sum] = "4526f786d673e4859ff2afa0bab2ba13c918b796519a25c1acce06dba9542340"
18 19
diff --git a/meta/recipes-devtools/rust/rust_1.75.0.bb b/meta/recipes-devtools/rust/rust_1.75.0.bb
index bb10c852b4..eae1f28bb8 100644
--- a/meta/recipes-devtools/rust/rust_1.75.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.75.0.bb
@@ -136,6 +136,7 @@ python do_configure() {
136 config.add_section("rust") 136 config.add_section("rust")
137 config.set("rust", "rpath", e(True)) 137 config.set("rust", "rpath", e(True))
138 config.set("rust", "remap-debuginfo", e(True)) 138 config.set("rust", "remap-debuginfo", e(True))
139 config.set("rust", "lto", "\"off\"")
139 config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}"))) 140 config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}")))
140 141
141 # Whether or not to optimize the compiler and standard library 142 # Whether or not to optimize the compiler and standard library