rust-target-config.bbclass: add RUST_TARGET_ABI to sstate signature exclusions
PATCH 1/2 rust-target-config.bbclass: add RUST_TARGET_ABI to sstate signature exclusions
From: Alexander Kanavin <[email protected]>
This was overlooked in
https://lists.openembedded.org/g/openembedded-core/message/218953
and caused non-reusable sstate for rust-native when the target is one of risc-v machines.
[YOCTO #16132]
--- meta/classes-recipe/rust-target-config.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/rust-target-config.bbclass +1 -1
@@ -433,7 +433,7 @@ def rust_gen_target(d, thing, wd, arch): json.dump(tspec, f, indent=4) # These are accounted for in tmpdir path names so don't need to be in the task sig -rust_gen_target[vardepsexclude] += "ABIEXTENSION llvm_cpu" +rust_gen_target[vardepsexclude] += "ABIEXTENSION llvm_cpu TUNE_RISCV_ABI" do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES"
Signature · 1 line
2.47.3
PATCH 2/2 rust-target-config.bbclass: apply signature exclusions only to native/nativesdk
From: Alexander Kanavin <[email protected]>
Applying these exclusions to target builds and expecting that rebuilds happen when they should relies on incidental
mechanisms like paths or other variables using the excluded ones.
Rather than think of possible scenarions where it works, and where it doesn't, let's not exclude the variables from target builds, so task signature calculation can be relied on.
[YOCTO #16132]
--- meta/classes-recipe/rust-target-config.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
meta/classes-recipe/rust-target-config.bbclass +4 -2
@@ -432,8 +432,10 @@ def rust_gen_target(d, thing, wd, arch): with open(wd + rustsys + '.json', 'w') as f: json.dump(tspec, f, indent=4) -# These are accounted for in tmpdir path names so don't need to be in the task sig -rust_gen_target[vardepsexclude] += "ABIEXTENSION llvm_cpu TUNE_RISCV_ABI" +RUSTCONFIG_EXCLUDEVARS = "" +RUSTCONFIG_EXCLUDEVARS:class-native = "ABIEXTENSION llvm_cpu TUNE_RISCV_ABI" +RUSTCONFIG_EXCLUDEVARS:class-nativesdk = "ABIEXTENSION llvm_cpu TUNE_RISCV_ABI" +rust_gen_target[vardepsexclude] += "${RUSTCONFIG_EXCLUDEVARS}" do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES"
Signature · 1 line
2.47.3