aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-03-28 20:42:11 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-03-28 20:43:15 +0530
commita8c6fd6aa4511ea0cc419c50fb6ed62c6b3961aa (patch)
tree1ed064d82871b88a2053e79df0ea1984db88321b /mesonbuild/compilers.py
parentd87eb7d2905eaa9ed7bac60945821c7b039298d8 (diff)
downloadmeson-a8c6fd6aa4511ea0cc419c50fb6ed62c6b3961aa.zip
meson-a8c6fd6aa4511ea0cc419c50fb6ed62c6b3961aa.tar.gz
meson-a8c6fd6aa4511ea0cc419c50fb6ed62c6b3961aa.tar.bz2
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
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r--mesonbuild/compilers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index ba5c269..9afff2b 100644
--- a/mesonbuild/compilers.py
+++ b/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)