Return a better warning if compiled executable is invalid.

pull/3790/head
Jussi Pakkanen 7 years ago
parent 2aa77c545b
commit 1a6765e631
  1. 5
      mesonbuild/compilers/c.py

@ -282,7 +282,10 @@ class CCompiler(Compiler):
else:
cmdlist = [binary_name]
mlog.debug('Running test binary command: ' + ' '.join(cmdlist))
pe = subprocess.Popen(cmdlist)
try:
pe = subprocess.Popen(cmdlist)
except Exception as e:
raise EnvironmentException('Could not invoke sanity test executable: %s.' % str(e))
pe.wait()
if pe.returncode != 0:
raise EnvironmentException('Executables created by {0} compiler {1} are not runnable.'.format(self.language, self.name_string()))

Loading…
Cancel
Save