aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-03-28 18:36:35 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2016-03-28 18:36:35 +0300
commit37d74736156e3146df5945f259fc71e959ca5dd2 (patch)
tree273de043c4b20d8b71e22ad7cd4bb2cf6b0a7d18
parent46c324eb6e2af1bf7bfebfb57a8f59343641f6ee (diff)
parenta8c6fd6aa4511ea0cc419c50fb6ed62c6b3961aa (diff)
downloadmeson-37d74736156e3146df5945f259fc71e959ca5dd2.zip
meson-37d74736156e3146df5945f259fc71e959ca5dd2.tar.gz
meson-37d74736156e3146df5945f259fc71e959ca5dd2.tar.bz2
Merge pull request #478 from centricular/sizeof_no_symbol
Return -1 from cc.sizeof if the symbol could not be found
-rw-r--r--mesonbuild/compilers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index f1868dd..3079c5e 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)