diff options
author | Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> | 2023-10-10 21:05:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-11 09:36:53 +0100 |
commit | b36cbd3f2bd2096129d14311f6f17f2c64482704 (patch) | |
tree | bfc854f06c3b00c14a503e75e75409257f1abbba /meta/recipes-devtools | |
parent | c2e094ddfd185f0fe2d2957ff89b9a4fde794942 (diff) | |
download | poky-b36cbd3f2bd2096129d14311f6f17f2c64482704.tar.gz |
rust: reproducibility issue fix
The '--remap-path-prefix' option removes all references to build directory
structure in the debug information within the compiled output for Cargo
dependencies and the project's binary.
However, some references to build directories remains in the final binary
in .rustc section in the form of compressed metadata and this makes the
build output dependent on the folder structure of the computer it's compiled on.
So, for reproducible builds, use the configuration option
'remap-debuginfo = true' along with the '--remap-path-prefix'.
[YOCTO# 14875]
(From OE-Core rev: 6ae62259afbbe861ed74211dab18a27b8c8d8b7a)
Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@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_1.70.0.bb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust_1.70.0.bb b/meta/recipes-devtools/rust/rust_1.70.0.bb index 3b9c05a19f..16d433910f 100644 --- a/meta/recipes-devtools/rust/rust_1.70.0.bb +++ b/meta/recipes-devtools/rust/rust_1.70.0.bb | |||
@@ -130,6 +130,7 @@ python do_configure() { | |||
130 | # [rust] | 130 | # [rust] |
131 | config.add_section("rust") | 131 | config.add_section("rust") |
132 | config.set("rust", "rpath", e(True)) | 132 | config.set("rust", "rpath", e(True)) |
133 | config.set("rust", "remap-debuginfo", e(True)) | ||
133 | config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}"))) | 134 | config.set("rust", "channel", e(d.expand("${RUST_CHANNEL}"))) |
134 | 135 | ||
135 | # Whether or not to optimize the compiler and standard library | 136 | # Whether or not to optimize the compiler and standard library |