Revert "detect Intel ICL on windows"

This reverts commit 3a75bb5259.
pull/5339/head
Dylan Baker 6 years ago
parent 482e26764e
commit da5f07cf39
  1. 4
      mesonbuild/compilers/__init__.py
  2. 6
      mesonbuild/compilers/c.py
  3. 9
      mesonbuild/compilers/cpp.py
  4. 19
      mesonbuild/environment.py

@ -69,8 +69,6 @@ __all__ = [
'IntelCCompiler', 'IntelCCompiler',
'IntelCPPCompiler', 'IntelCPPCompiler',
'IntelFortranCompiler', 'IntelFortranCompiler',
'IntelClCCompiler',
'IntelClCPPCompiler',
'JavaCompiler', 'JavaCompiler',
'LLVMDCompiler', 'LLVMDCompiler',
'MonoCompiler', 'MonoCompiler',
@ -132,7 +130,6 @@ from .c import (
GnuCCompiler, GnuCCompiler,
ElbrusCCompiler, ElbrusCCompiler,
IntelCCompiler, IntelCCompiler,
IntelClCCompiler,
PGICCompiler, PGICCompiler,
CcrxCCompiler, CcrxCCompiler,
VisualStudioCCompiler, VisualStudioCCompiler,
@ -146,7 +143,6 @@ from .cpp import (
GnuCPPCompiler, GnuCPPCompiler,
ElbrusCPPCompiler, ElbrusCPPCompiler,
IntelCPPCompiler, IntelCPPCompiler,
IntelClCPPCompiler,
PGICPPCompiler, PGICPPCompiler,
CcrxCPPCompiler, CcrxCPPCompiler,
VisualStudioCPPCompiler, VisualStudioCPPCompiler,

@ -1729,12 +1729,6 @@ class ClangClCCompiler(VisualStudioCCompiler):
self.id = 'clang-cl' self.id = 'clang-cl'
class IntelClCCompiler(VisualStudioCCompiler):
def __init__(self, exelist, version, is_cross, exe_wrap, target):
super().__init__(exelist, version, is_cross, exe_wrap, target)
self.id = 'intel'
class ArmCCompiler(ArmCompiler, CCompiler): class ArmCCompiler(ArmCompiler, CCompiler):
def __init__(self, exelist, version, compiler_type, is_cross, exe_wrapper=None, **kwargs): def __init__(self, exelist, version, compiler_type, is_cross, exe_wrapper=None, **kwargs):
CCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwargs) CCompiler.__init__(self, exelist, version, is_cross, exe_wrapper, **kwargs)

@ -19,7 +19,7 @@ from .. import coredata
from .. import mlog from .. import mlog
from ..mesonlib import MesonException, version_compare from ..mesonlib import MesonException, version_compare
from .c import CCompiler, VisualStudioCCompiler, ClangClCCompiler, IntelClCCompiler from .c import CCompiler, VisualStudioCCompiler, ClangClCCompiler
from .compilers import ( from .compilers import (
gnu_winlibs, gnu_winlibs,
msvc_winlibs, msvc_winlibs,
@ -406,13 +406,6 @@ class ClangClCPPCompiler(VisualStudioCPPCompiler, ClangClCCompiler):
VisualStudioCPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, target) VisualStudioCPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, target)
self.id = 'clang-cl' self.id = 'clang-cl'
class IntelClCPPCompiler(VisualStudioCPPCompiler, IntelClCCompiler):
def __init__(self, exelist, version, is_cross, exe_wrap, target):
VisualStudioCPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, target)
self.id = 'intel'
class ArmCPPCompiler(ArmCompiler, CPPCompiler): class ArmCPPCompiler(ArmCompiler, CPPCompiler):
def __init__(self, exelist, version, compiler_type, is_cross, exe_wrap=None, **kwargs): def __init__(self, exelist, version, compiler_type, is_cross, exe_wrap=None, **kwargs):
CPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, **kwargs) CPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap, **kwargs)

@ -61,8 +61,6 @@ from .compilers import (
IntelCCompiler, IntelCCompiler,
IntelCPPCompiler, IntelCPPCompiler,
IntelFortranCompiler, IntelFortranCompiler,
IntelClCCompiler,
IntelClCPPCompiler,
JavaCompiler, JavaCompiler,
MonoCompiler, MonoCompiler,
CudaCompiler, CudaCompiler,
@ -681,7 +679,6 @@ class Environment:
arg = '-v' arg = '-v'
else: else:
arg = '--version' arg = '--version'
try: try:
p, out, err = Popen_safe(compiler + [arg]) p, out, err = Popen_safe(compiler + [arg])
except OSError as e: except OSError as e:
@ -690,11 +687,6 @@ class Environment:
if 'ccrx' in compiler[0]: if 'ccrx' in compiler[0]:
out = err out = err
if 'icl' in compiler[0]:
# https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-alphabetical-list-of-compiler-options
# https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-logo
# most consistent way for ICL is to just let compiler error and tell version
out = err
full_version = out.split('\n', 1)[0] full_version = out.split('\n', 1)[0]
version = search_version(out) version = search_version(out)
@ -794,15 +786,12 @@ class Environment:
if mesonlib.for_darwin(want_cross, self): if mesonlib.for_darwin(want_cross, self):
compiler_type = CompilerType.ICC_OSX compiler_type = CompilerType.ICC_OSX
elif mesonlib.for_windows(want_cross, self): elif mesonlib.for_windows(want_cross, self):
raise EnvironmentException('At the time of authoring, there was no ICC for Windows') # TODO: fix ICC on Windows
compiler_type = CompilerType.ICC_WIN
else: else:
compiler_type = CompilerType.ICC_STANDARD compiler_type = CompilerType.ICC_STANDARD
cls = IntelCCompiler if lang == 'c' else IntelCPPCompiler cls = IntelCCompiler if lang == 'c' else IntelCPPCompiler
return cls(ccache + compiler, version, compiler_type, is_cross, exe_wrap, full_version=full_version) return cls(ccache + compiler, version, compiler_type, is_cross, exe_wrap, full_version=full_version)
if out.startswith('Intel(R) C++') and mesonlib.for_windows(want_cross, self):
cls = IntelClCCompiler if lang == 'c' else IntelClCPPCompiler
target = 'x64' if 'Intel(R) 64 Compiler' in out else 'x86'
return cls(compiler, version, is_cross, exe_wrap, target)
if 'ARM' in out: if 'ARM' in out:
compiler_type = CompilerType.ARM_WIN compiler_type = CompilerType.ARM_WIN
cls = ArmCCompiler if lang == 'c' else ArmCPPCompiler cls = ArmCCompiler if lang == 'c' else ArmCPPCompiler
@ -1066,8 +1055,8 @@ class Environment:
# up to date language version at time (2016). # up to date language version at time (2016).
if exelist is not None: if exelist is not None:
if os.path.basename(exelist[-1]).startswith(('ldmd', 'gdmd')): if os.path.basename(exelist[-1]).startswith(('ldmd', 'gdmd')):
raise EnvironmentException('Meson does not support {} as it is only a DMD frontend for another compiler.' raise EnvironmentException('Meson does not support {} as it is only a DMD frontend for another compiler.'.format(exelist[-1])
'Please provide a valid value for DC or unset it so that Meson can resolve the compiler by itself.'.format(exelist[-1])) 'Please provide a valid value for DC or unset it so that Meson can resolve the compiler by itself.')
else: else:
for d in self.default_d: for d in self.default_d:
if shutil.which(d): if shutil.which(d):

Loading…
Cancel
Save