claw: enable building with clang@11: and aocc@3: (#29891)

This commit is contained in:
Sergey Kosukhin 2022-04-06 06:57:38 +02:00 committed by GitHub
parent da6d9a33c1
commit 2816d28e90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,12 +57,10 @@ class Claw(CMakePackage):
def flag_handler(self, name, flags):
if name == 'cflags':
comp_spec = self.spec.compiler
# https://gcc.gnu.org/gcc-10/porting_to.html
# https://releases.llvm.org/11.0.0/tools/clang/docs/ReleaseNotes.html#modified-compiler-flags
# TODO: take care of other Clang-based compilers when they become
# real cases
if comp_spec.satisfies('gcc@10:') or comp_spec.satisfies('cce@11:'):
if any([self.spec.compiler.satisfies(s) for s in
['gcc@10:', 'clang@11:', 'cce@11:', 'aocc@3:']]):
# https://gcc.gnu.org/gcc-10/porting_to.html
# https://releases.llvm.org/11.0.0/tools/clang/docs/ReleaseNotes.html#modified-compiler-flags
flags.append('-fcommon')
return flags, None, None