diff options
author | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2016-04-15 00:04:08 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2016-04-15 00:25:35 +0530 |
commit | 2bdaa1f0c181511fab143eccf68c77fcc60c46e2 (patch) | |
tree | 8bf803992ee30da0bdd10773264cd9c82fc0400b | |
parent | c0765b0e8da6ad699b02dcc19a6480b3e6f71655 (diff) | |
download | meson-2bdaa1f0c181511fab143eccf68c77fcc60c46e2.zip meson-2bdaa1f0c181511fab143eccf68c77fcc60c46e2.tar.gz meson-2bdaa1f0c181511fab143eccf68c77fcc60c46e2.tar.bz2 |
Separate out cpu_method to environment.py and add amd64 quirk
-rw-r--r-- | mesonbuild/environment.py | 7 | ||||
-rw-r--r-- | mesonbuild/interpreter.py | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index eae7cc0..a7d6d97 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -69,6 +69,13 @@ def detect_cpu_family(): # Add fixes here as bugs are reported. return trial +def detect_cpu(): + trial = platform.machine().lower() + if trial == 'amd64': + return 'x86_64' + # Add fixes here as bugs are reported. + return trial + def detect_system(): return platform.system().lower() diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 3a831ce..e51692e 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -326,7 +326,7 @@ class BuildMachine(InterpreterObject): return environment.detect_cpu_family() def cpu_method(self, args, kwargs): - return platform.machine().lower() + return environment.detect_cpu() def system_method(self, args, kwargs): return environment.detect_system() |