FlangFortranCompiler inherit ClangCompiler
This commit is contained in:
parent
9a318d3d5a
commit
9bb21be59b
|
@ -1311,8 +1311,6 @@ class CompilerType(enum.Enum):
|
||||||
|
|
||||||
PGI_STANDARD = 50
|
PGI_STANDARD = 50
|
||||||
|
|
||||||
FLANG_STANDARD = 60
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_standard_compiler(self):
|
def is_standard_compiler(self):
|
||||||
return self.name in ('GCC_STANDARD', 'CLANG_STANDARD', 'ICC_STANDARD')
|
return self.name in ('GCC_STANDARD', 'CLANG_STANDARD', 'ICC_STANDARD')
|
||||||
|
@ -1625,29 +1623,6 @@ class PGICompiler:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
class FlangCompiler:
|
|
||||||
def __init__(self, compiler_type):
|
|
||||||
self.id = 'flang'
|
|
||||||
self.compiler_type = compiler_type
|
|
||||||
|
|
||||||
default_warn_args = ['-Minform=inform']
|
|
||||||
self.warn_args = {'1': default_warn_args,
|
|
||||||
'2': default_warn_args,
|
|
||||||
'3': default_warn_args}
|
|
||||||
|
|
||||||
def get_module_incdir_args(self):
|
|
||||||
return ('-module', )
|
|
||||||
|
|
||||||
def get_no_warn_args(self):
|
|
||||||
return ['-silent']
|
|
||||||
|
|
||||||
def openmp_flags(self):
|
|
||||||
return ['-mp']
|
|
||||||
|
|
||||||
def get_allow_undefined_link_args(self):
|
|
||||||
return []
|
|
||||||
|
|
||||||
|
|
||||||
class ElbrusCompiler(GnuCompiler):
|
class ElbrusCompiler(GnuCompiler):
|
||||||
# Elbrus compiler is nearly like GCC, but does not support
|
# Elbrus compiler is nearly like GCC, but does not support
|
||||||
# PCH, LTO, sanitizers and color output as of version 1.21.x.
|
# PCH, LTO, sanitizers and color output as of version 1.21.x.
|
||||||
|
|
|
@ -22,7 +22,7 @@ from .compilers import (
|
||||||
clike_debug_args,
|
clike_debug_args,
|
||||||
Compiler,
|
Compiler,
|
||||||
GnuCompiler,
|
GnuCompiler,
|
||||||
FlangCompiler,
|
ClangCompiler,
|
||||||
ElbrusCompiler,
|
ElbrusCompiler,
|
||||||
IntelCompiler,
|
IntelCompiler,
|
||||||
PGICompiler
|
PGICompiler
|
||||||
|
@ -383,10 +383,15 @@ class PGIFortranCompiler(PGICompiler, FortranCompiler):
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
|
||||||
class FlangFortranCompiler(FlangCompiler, FortranCompiler):
|
class FlangFortranCompiler(ClangCompiler, FortranCompiler):
|
||||||
def __init__(self, exelist, version, is_cross, exe_wrapper=None, **kwags):
|
def __init__(self, exelist, version, is_cross, exe_wrapper=None, **kwags):
|
||||||
FortranCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwags)
|
FortranCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwags)
|
||||||
FlangCompiler.__init__(self, CompilerType.FLANG_STANDARD)
|
ClangCompiler.__init__(self, CompilerType.CLANG_STANDARD)
|
||||||
|
self.id = 'flang'
|
||||||
|
default_warn_args = ['-Minform=inform']
|
||||||
|
self.warn_args = {'1': default_warn_args,
|
||||||
|
'2': default_warn_args,
|
||||||
|
'3': default_warn_args}
|
||||||
|
|
||||||
|
|
||||||
class Open64FortranCompiler(FortranCompiler):
|
class Open64FortranCompiler(FortranCompiler):
|
||||||
|
|
Loading…
Reference in New Issue