diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2017-08-02 21:09:16 +1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-09 09:24:16 +0100 |
commit | f42754a2d87552a4b3b0b8bf5abaf22d814bf5bf (patch) | |
tree | b2db43ffe803db9cf3d9b6a857ef527b56612307 | |
parent | a479bdd4fbe5a3090739b720aac319cb795b277d (diff) | |
download | poky-f42754a2d87552a4b3b0b8bf5abaf22d814bf5bf.tar.gz |
llvm: Raise SkipRecipe exception for unsupported architectures
When parsing this recipe on an unsupported or non-mappable architecture
an error is generated despite no dependencies on the recipe. E.g.
ERROR: .../llvm_git.bb: cannot map 'microblazeel' to a supported llvm architecture
Instead of generating an error which might confuse users, raise a
SkipRecipe exception similar to other arch-style mapping functions (e.g.
go_map_arch). This avoids showing the error during parse, and prevents
the use of the recipe on unsupported targets. Resulting in an error like
so when trying to build llvm:
ERROR: Nothing PROVIDES 'llvm'
llvm was skipped: Cannot map 'microblazeel' to a supported LLVM architecture
(From OE-Core rev: d796abac982f368aa088a291560b565cc47a2c27)
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/llvm/llvm_git.bb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb index 722bc53aa1..f36e6978ed 100644 --- a/meta/recipes-devtools/llvm/llvm_git.bb +++ b/meta/recipes-devtools/llvm/llvm_git.bb | |||
@@ -42,8 +42,7 @@ def get_llvm_arch(bb, d, arch_var): | |||
42 | elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips' | 42 | elif re.match('mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips' |
43 | elif re.match('p(pc|owerpc)(|64)', a): return 'PowerPC' | 43 | elif re.match('p(pc|owerpc)(|64)', a): return 'PowerPC' |
44 | else: | 44 | else: |
45 | bb.error("cannot map '%s' to a supported llvm architecture" % a) | 45 | raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a) |
46 | return "" | ||
47 | 46 | ||
48 | def get_llvm_target_arch(bb, d): | 47 | def get_llvm_target_arch(bb, d): |
49 | return get_llvm_arch(bb, d, 'TARGET_ARCH') | 48 | return get_llvm_arch(bb, d, 'TARGET_ARCH') |