compilers: Return -1 from cc.sizeof if the symbol could not be found

Allows people to avoid adding a separate check for the symbol existing in case
it's platform-specific
pull/478/head
Nirbheek Chauhan 9 years ago
parent d87eb7d290
commit a8c6fd6aa4
  1. 2
      mesonbuild/compilers.py

@ -574,7 +574,7 @@ int main(int argc, char **argv) {
'''
res = self.run(templ % (prefix, element), extra_args)
if not res.compiled:
raise EnvironmentException('Could not compile sizeof test.')
return -1
if res.returncode != 0:
raise EnvironmentException('Could not run sizeof test binary.')
return int(res.stdout)

Loading…
Cancel
Save