From a2ee76228e29f4cf5f52197dd2a726620445c81b Mon Sep 17 00:00:00 2001 From: "Bedarkar, Malhar" Date: Mon, 5 Mar 2018 18:26:39 -0600 Subject: First cut of ARMCC support for MESON. Change-Id: I15d8258e84d392baaccb8f670e33eefcfe8cd49a --- mesonbuild/environment.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'mesonbuild/environment.py') 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: -- cgit v1.1