Skip to content

Commit c180467

Browse files
antznineldruin
authored andcommitted
classes/rust_bin-common: avoid failing when os does not match
The rust_bin-common defines rust_target(), a function called at parsing time by bitbake. Calling bb.fatal() in a multiconfig context builds is problematic, because the alternate config might not build for Linux. For example when building a baremetal companion firmware. Yet, our multiconfig recipes are still evaluated during parsing, and in this case, it makes more sense skipping the recipe rather than producing an error. Use bb.parse.SkipRecipe() instead of bb.fatal(). Signed-off-by: Antonin Godard <[email protected]>
1 parent b5fe3f0 commit c180467

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/rust_bin-common.bbclass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def rust_target(d, spec_type):
4242
tune = []
4343

4444
if not os == 'linux':
45-
bb.fatal("Unsupported OS: %s. Only Linux is supported." % os)
45+
raise bb.parse.SkipRecipe("Unsupported OS: %s. Only Linux is supported." % os)
4646

4747
if arch in ["i386", "i486", "i586", "i686", "i786", "x86"]:
4848
arch = "i686"

0 commit comments

Comments
 (0)