aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-01-26 10:14:57 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-01-26 12:36:47 +0530
commite084a47a0a28f0bae70057ddb7812cb283456d07 (patch)
tree080f020a4c86b4c398f3629510cf449c53256557 /mesonbuild/compilers.py
parent85b8e92bc447a13a19d42bc9ebe8758cd05be463 (diff)
downloadmeson-e084a47a0a28f0bae70057ddb7812cb283456d07.zip
meson-e084a47a0a28f0bae70057ddb7812cb283456d07.tar.gz
meson-e084a47a0a28f0bae70057ddb7812cb283456d07.tar.bz2
compilers: Don't run built-in checks on MSVC
MSVC does not have built-ins, so this is totally useless. Instead, add a test for intrinsics to ensure that we do find them.
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r--mesonbuild/compilers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index c800bbe..de14d4a 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -1046,6 +1046,10 @@ class CCompiler(Compiler):
if self.links(templ.format(**fargs), env, extra_args, dependencies):
return True
+ # MSVC does not have compiler __builtin_-s.
+ if self.get_id() == 'msvc':
+ return False
+
# Detect function as a built-in
#
# Some functions like alloca() are defined as compiler built-ins which