From 9a093d034889bff444a5801313e24c39a323d7ef Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 5 Aug 2022 12:54:14 +0100 Subject: rust-target-config: Show clear error when target isn't defined (From OE-Core rev: b30ee171de9cd736d16d783410cf748e35309257) Signed-off-by: Richard Purdie --- meta/classes/rust-target-config.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/rust-target-config.bbclass b/meta/classes/rust-target-config.bbclass index 7fe039601a..ab177cf59f 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) -- cgit v1.2.3-54-g00ecf