From: Richard Purdie Date: Fri, 5 Aug 2022 11:54:14 +0000 (+0100) Subject: rust-target-config: Show clear error when target isn't defined X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~3418 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b30ee171de9cd736d16d783410cf748e35309257;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git rust-target-config: Show clear error when target isn't defined Signed-off-by: Richard Purdie --- diff --git a/meta/classes/rust-target-config.bbclass b/meta/classes/rust-target-config.bbclass index 7fe039601af..ab177cf59f4 100644 --- a/meta/classes/rust-target-config.bbclass +++ b/meta/classes/rust-target-config.bbclass @@ -326,6 +326,8 @@ def rust_gen_target(d, thing, wd, arch): tspec = {} tspec['llvm-target'] = llvm_target tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi) + if tspec['data-layout'] is None: + bb.fatal("No rust target defined for %s" % arch_abi) tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi)) tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi) tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi)