]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
rust: rustdoc reproducibility issue fix - disable PGO
authorSundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Wed, 20 Dec 2023 10:40:20 +0000 (02:40 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Dec 2023 10:37:28 +0000 (10:37 +0000)
The PGO (Profile-guided Optimization) collect data about the typical execution of a program
and then use this data to inform optimizations such as inlining, machine-code layout,
register allocation, etc.

This optimization is by default disabled in rust sources but enabled in Yocto and causing
the reproducibility issue in rustdoc binary. To fix the issue this optimization is set to
it's default 'false'.

More about the optimization: https://doc.rust-lang.org/rustc/profile-guided-optimization.html

With the reproducibility issue fixed, we can enable the reproducibility tests again.

Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/reproducible.py
meta/recipes-devtools/rust/rust_1.71.1.bb

index 14ccb0b24d5950fbe9adf34c9d208b37c7ce4be7..80e830136f76ea069c68d4de20cad2db08f7b9f6 100644 (file)
@@ -16,8 +16,6 @@ import os
 import datetime
 
 exclude_packages = [
-       'rust-rustdoc',
-       'rust-dbg'
        ]
 
 def is_excluded(package):
index 3d176e54c15c7783faed39a3b574bacc80e3db65..bc076997decdd7081c0a983da717df3c1bafc2df 100644 (file)
@@ -141,13 +141,14 @@ python do_configure() {
     config.add_section("build")
     config.set("build", "submodules", e(False))
     config.set("build", "docs", e(False))
+    config.set("build", "tools", ["rust-demangler",])
 
     rustc = d.expand("${WORKDIR}/rust-snapshot/bin/rustc")
     config.set("build", "rustc", e(rustc))
 
     # Support for the profiler runtime to generate e.g. coverage report,
     # PGO etc.
-    config.set("build", "profiler", e(True))
+    config.set("build", "profiler", e(False))
 
     cargo = d.expand("${WORKDIR}/rust-snapshot/bin/cargo")
     config.set("build", "cargo", e(cargo))