aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-03-24 19:14:33 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-04-04 22:30:13 +0530
commitd0d7cbd88b71379704cf1e456da749aacdb6687d (patch)
tree1d0c52d746a8a47f5f01dfd24a148ff49ece2aa3 /mesonbuild/environment.py
parent99649e66908693c58fa0c015dbcce19ad8f55b19 (diff)
downloadmeson-d0d7cbd88b71379704cf1e456da749aacdb6687d.zip
meson-d0d7cbd88b71379704cf1e456da749aacdb6687d.tar.gz
meson-d0d7cbd88b71379704cf1e456da749aacdb6687d.tar.bz2
compilers: Rename 'get_define' to 'get_builtin_define'
We will use `get_define` to implement a function that fetches the values of defines from headers.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 92040c4..1beb63c 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -102,7 +102,7 @@ def detect_windows_arch(compilers):
platform = os.environ.get('Platform', 'x86').lower()
if platform == 'x86':
return platform
- if compiler.id == 'gcc' and compiler.has_define('__i386__'):
+ if compiler.id == 'gcc' and compiler.has_builtin_define('__i386__'):
return 'x86'
return os_arch
@@ -129,10 +129,10 @@ def detect_cpu_family(compilers):
# to know is to check the compiler defines.
for c in compilers.values():
try:
- if c.has_define('__i386__'):
+ if c.has_builtin_define('__i386__'):
return 'x86'
except mesonlib.MesonException:
- # Ignore compilers that do not support has_define.
+ # Ignore compilers that do not support has_builtin_define.
pass
return 'x86_64'
# Add fixes here as bugs are reported.
@@ -149,7 +149,7 @@ def detect_cpu(compilers):
# Same check as above for cpu_family
for c in compilers.values():
try:
- if c.has_define('__i386__'):
+ if c.has_builtin_define('__i386__'):
return 'i686' # All 64 bit cpus have at least this level of x86 support.
except mesonlib.MesonException:
pass