diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2019-04-30 15:41:36 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2019-05-13 11:22:31 -0700 |
| commit | 080f59cf43797a37e1711474b3093f48fefa95c9 (patch) | |
| tree | d1e2df192d7ff90287dfcb9f20e865f6b193d8d1 | |
| parent | 5fb64b0cfa48daf7f2c412ee8e851fa29f2ef1a3 (diff) | |
| download | meson-080f59cf43797a37e1711474b3093f48fefa95c9.tar.gz | |
compilers: rename IntelCompiler to IntelGnuLikeCompiler
The Intel compiler is strange. On Linux and macOS it's called ICC, and
it tries to mostly behave like gcc/clang. On Windows it's called ICL,
and tries to behave like MSVC. This makes the code that's used to
implement ICC support useless for supporting ICL, because their command
line interfaces are completely different.
| -rw-r--r-- | mesonbuild/compilers/__init__.py | 4 | ||||
| -rw-r--r-- | mesonbuild/compilers/c.py | 6 | ||||
| -rw-r--r-- | mesonbuild/compilers/compilers.py | 2 | ||||
| -rw-r--r-- | mesonbuild/compilers/cpp.py | 6 | ||||
| -rw-r--r-- | mesonbuild/compilers/fortran.py | 8 | ||||
| -rwxr-xr-x | run_unittests.py | 2 |
6 files changed, 14 insertions, 14 deletions
diff --git a/mesonbuild/compilers/__init__.py b/mesonbuild/compilers/__init__.py index 3c06f3803..7be1b4c89 100644 --- a/mesonbuild/compilers/__init__.py +++ b/mesonbuild/compilers/__init__.py @@ -65,7 +65,7 @@ __all__ = [ 'FlangFortranCompiler', 'GnuObjCCompiler', 'GnuObjCPPCompiler', - 'IntelCompiler', + 'IntelGnuLikeCompiler', 'IntelCCompiler', 'IntelCPPCompiler', 'IntelFortranCompiler', @@ -119,7 +119,7 @@ from .compilers import ( ClangCompiler, CompilerArgs, GnuCompiler, - IntelCompiler, + IntelGnuLikeCompiler, CcrxCompiler, VisualStudioLikeCompiler, ) diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 73a408343..e7c93388a 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -30,7 +30,7 @@ from .compilers import ( CompilerType, GnuCompiler, ElbrusCompiler, - IntelCompiler, + IntelGnuLikeCompiler, PGICompiler, CcrxCompiler, VisualStudioLikeCompiler, @@ -221,10 +221,10 @@ class ElbrusCCompiler(GnuCCompiler, ElbrusCompiler): dependencies=dependencies) -class IntelCCompiler(IntelCompiler, CCompiler): +class IntelCCompiler(IntelGnuLikeCompiler, CCompiler): def __init__(self, exelist, version, compiler_type, is_cross, exe_wrapper=None, **kwargs): CCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwargs) - IntelCompiler.__init__(self, compiler_type) + IntelGnuLikeCompiler.__init__(self, compiler_type) self.lang_header = 'c-header' default_warn_args = ['-Wall', '-w3', '-diag-disable:remark'] self.warn_args = {'0': [], diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 653e368df..da9ae74ed 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -2288,7 +2288,7 @@ class ArmclangCompiler: # Tested on linux for ICC 14.0.3, 15.0.6, 16.0.4, 17.0.1, 19.0.0 -class IntelCompiler(GnuLikeCompiler): +class IntelGnuLikeCompiler(GnuLikeCompiler): def __init__(self, compiler_type): super().__init__(compiler_type) diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index c8f4b0eac..fe2839a04 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -27,7 +27,7 @@ from .compilers import ( ClangCompiler, GnuCompiler, ElbrusCompiler, - IntelCompiler, + IntelGnuLikeCompiler, PGICompiler, ArmCompiler, ArmclangCompiler, @@ -301,10 +301,10 @@ class ElbrusCPPCompiler(GnuCPPCompiler, ElbrusCompiler): dependencies=dependencies) -class IntelCPPCompiler(IntelCompiler, CPPCompiler): +class IntelCPPCompiler(IntelGnuLikeCompiler, CPPCompiler): def __init__(self, exelist, version, compiler_type, is_cross, exe_wrap, **kwargs): CPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, **kwargs) - IntelCompiler.__init__(self, compiler_type) + IntelGnuLikeCompiler.__init__(self, compiler_type) self.lang_header = 'c++-header' default_warn_args = ['-Wall', '-w3', '-diag-disable:remark', '-Wpch-messages', '-Wnon-virtual-dtor'] diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index 3fee43bb6..4f9b9ffa3 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -26,8 +26,8 @@ from .compilers import ( GnuCompiler, ClangCompiler, ElbrusCompiler, - IntelCompiler, - PGICompiler, + IntelGnuLikeCompiler, + PGICompiler ) from .clike import CLikeCompiler @@ -213,13 +213,13 @@ class SunFortranCompiler(FortranCompiler): return ['-xopenmp'] -class IntelFortranCompiler(IntelCompiler, FortranCompiler): +class IntelFortranCompiler(IntelGnuLikeCompiler, FortranCompiler): def __init__(self, exelist, version, is_cross, exe_wrapper=None, **kwags): self.file_suffixes = ('f90', 'f', 'for', 'ftn', 'fpp') FortranCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwags) # FIXME: Add support for OS X and Windows in detect_fortran_compiler so # we are sent the type of compiler - IntelCompiler.__init__(self, CompilerType.ICC_STANDARD) + IntelGnuLikeCompiler.__init__(self, CompilerType.ICC_STANDARD) self.id = 'intel' default_warn_args = ['-warn', 'general', '-warn', 'truncated_source'] self.warn_args = {'0': [], diff --git a/run_unittests.py b/run_unittests.py index 0ce4a772f..4f2781755 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1939,7 +1939,7 @@ class AllPlatformTests(BasePlatformTests): ''' gnu = mesonbuild.compilers.GnuCompiler clang = mesonbuild.compilers.ClangCompiler - intel = mesonbuild.compilers.IntelCompiler + intel = mesonbuild.compilers.IntelGnuLikeCompiler msvc = (mesonbuild.compilers.VisualStudioCCompiler, mesonbuild.compilers.VisualStudioCPPCompiler) clangcl = (mesonbuild.compilers.ClangClCCompiler, mesonbuild.compilers.ClangClCPPCompiler) ar = mesonbuild.linkers.ArLinker |
