Fixed lchmod detection for lcc C/C++ compilers

pull/3115/head
makise-homura 7 years ago
parent 942e34241f
commit 546f81e0f9
  1. 8
      mesonbuild/compilers/c.py
  2. 8
      mesonbuild/compilers/cpp.py

@ -903,6 +903,14 @@ class ElbrusCCompiler(GnuCCompiler, ElbrusCompiler):
'none')}
return opts
# Elbrus C compiler does not have lchmod, but there is only linker warning, not compiler error.
# So we should explicitly fail at this case.
def has_function(self, funcname, prefix, env, extra_args=None, dependencies=None):
if funcname == 'lchmod':
return False
else:
return super().has_function(funcname, prefix, env, extra_args, dependencies)
class IntelCCompiler(IntelCompiler, CCompiler):
def __init__(self, exelist, version, icc_type, is_cross, exe_wrapper=None, **kwargs):

@ -148,6 +148,14 @@ class ElbrusCPPCompiler(GnuCPPCompiler, ElbrusCompiler):
'none')
return opts
# Elbrus C++ compiler does not have lchmod, but there is only linker warning, not compiler error.
# So we should explicitly fail at this case.
def has_function(self, funcname, prefix, env, extra_args=None, dependencies=None):
if funcname == 'lchmod':
return False
else:
return super().has_function(funcname, prefix, env, extra_args, dependencies)
class IntelCPPCompiler(IntelCompiler, CPPCompiler):
def __init__(self, exelist, version, icc_type, is_cross, exe_wrap, **kwargs):

Loading…
Cancel
Save