aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorBedarkar, Malhar <malhar.bedarkar@cirrus.com>2018-03-05 18:26:39 -0600
committerBedarkar, Malhar <malhar.bedarkar@cirrus.com>2018-03-05 18:26:39 -0600
commita2ee76228e29f4cf5f52197dd2a726620445c81b (patch)
treec1436fc968d8b69c241a91316ec72cc4557c96dc /mesonbuild/environment.py
parent7842bc03dd581c4beaa1b94746b5dfe5d38986c6 (diff)
downloadmeson-a2ee76228e29f4cf5f52197dd2a726620445c81b.zip
meson-a2ee76228e29f4cf5f52197dd2a726620445c81b.tar.gz
meson-a2ee76228e29f4cf5f52197dd2a726620445c81b.tar.bz2
First cut of ARMCC support for MESON.
Change-Id: I15d8258e84d392baaccb8f670e33eefcfe8cd49a
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 31ca2a2..1d3ba72 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -38,6 +38,7 @@ from .compilers import (
is_source,
)
from .compilers import (
+ ARMCCompiler,
ClangCCompiler,
ClangCPPCompiler,
ClangObjCCompiler,
@@ -492,7 +493,10 @@ class Environment:
continue
arg = '/?'
else:
- arg = '--version'
+ if re.search('.*arm.*', compiler[0]):
+ arg = '--vsn'
+ else:
+ arg = '--version'
try:
p, out, err = Popen_safe(compiler + [arg])
except OSError as e:
@@ -537,6 +541,8 @@ class Environment:
inteltype = ICC_STANDARD
cls = IntelCCompiler if lang == 'c' else IntelCPPCompiler
return cls(ccache + compiler, version, inteltype, is_cross, exe_wrap, full_version=full_version)
+ if 'ARM' in out:
+ return ARMCCompiler(ccache + compiler, version, is_cross, exe_wrap, full_version=full_version)
self._handle_exceptions(popen_exceptions, compilers)
def detect_c_compiler(self, want_cross):
@@ -791,7 +797,10 @@ class Environment:
if 'lib' in linker or 'lib.exe' in linker:
arg = '/?'
else:
- arg = '--version'
+ if re.search('.*arm.*', linker[0]):
+ arg = '--vsn'
+ else:
+ arg = '--version'
try:
p, out, err = Popen_safe(linker + [arg])
except OSError as e: