diff options
author | Sundeep KOKKONDA <sundeep.kokkonda@windriver.com> | 2024-07-26 06:35:59 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-07-30 12:32:53 +0100 |
commit | e2e7017350d0b5324811fef3b841f98b00273887 (patch) | |
tree | 516f11ebac17c05c7481f72b5747708b82b3fbf1 /meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch | |
parent | 7c1de3118fef96fa899ae5365f80ea8ccb1a5876 (diff) | |
download | poky-e2e7017350d0b5324811fef3b841f98b00273887.tar.gz |
rust: rustdoc reproducibility issue fix
The '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.
To fix this the codegen-units & the lto options are disabled.
More info about options:
https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units
https://doc.rust-lang.org/rustc/codegen-options/index.html#lto
(From OE-Core rev: 0c00875de10b171f4ff2990af351a8124ec7e972)
Signed-off-by: Sundeep KOKKONDA <sundeep.kokkonda@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch')
-rw-r--r-- | meta/recipes-devtools/rust/files/rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch | 26 |
1 files changed, 26 insertions, 0 deletions
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 @@ | |||
1 | rust: rustdoc reproducibility issue fix | ||
2 | |||
3 | rust: rustdoc reproducibility issue fix | ||
4 | |||
5 | The '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. | ||
6 | To fix this the codegen-units & the lto options are disabled. | ||
7 | |||
8 | More info about options: | ||
9 | https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units | ||
10 | https://doc.rust-lang.org/rustc/codegen-options/index.html#lto | ||
11 | |||
12 | Upstream-Status: Inappropriate [oe specific] | ||
13 | |||
14 | Signed-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 | |||