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 From 831d1e4c2e7b0ce8dfd0b2471bf2dab499181d66 Mon Sep 17 00:00:00 2001 From: "Bedarkar, Malhar" Date: Wed, 14 Mar 2018 22:42:06 -0500 Subject: - Updating cpp_std options similar to other compiler classes - Updating environment.py for selecting '--vsn' option for armcc only. - Updating build type arguments from GitHub pull request - 3157 Change-Id: Id3151e7715ec1016afdbd65391bb0d414ec7de13 --- mesonbuild/environment.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'mesonbuild/environment.py') diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 1d3ba72..f9cd9ca 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -39,6 +39,7 @@ from .compilers import ( ) from .compilers import ( ARMCCompiler, + ARMCPPCompiler, ClangCCompiler, ClangCPPCompiler, ClangObjCCompiler, @@ -493,7 +494,7 @@ class Environment: continue arg = '/?' else: - if re.search('.*arm.*', compiler[0]): + if compiler[0] == 'armcc': arg = '--vsn' else: arg = '--version' @@ -542,7 +543,8 @@ class Environment: 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) + cls = ARMCCompiler if lang == 'c' else ARMCPPCompiler + return cls(ccache + compiler, version, is_cross, exe_wrap, full_version=full_version) self._handle_exceptions(popen_exceptions, compilers) def detect_c_compiler(self, want_cross): @@ -797,9 +799,6 @@ class Environment: if 'lib' in linker or 'lib.exe' in linker: arg = '/?' else: - if re.search('.*arm.*', linker[0]): - arg = '--vsn' - else: arg = '--version' try: p, out, err = Popen_safe(linker + [arg]) -- cgit v1.1 From e62b8109ebfef437a380f2d8cedd1565095a5574 Mon Sep 17 00:00:00 2001 From: Somasekhar Penugonda Date: Thu, 15 Mar 2018 18:33:11 +0530 Subject: Updates to CPP support and update review changes --- mesonbuild/environment.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'mesonbuild/environment.py') diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index f9cd9ca..5c982fd 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -38,8 +38,8 @@ from .compilers import ( is_source, ) from .compilers import ( - ARMCCompiler, - ARMCPPCompiler, + ArmCCompiler, + ArmCPPCompiler, ClangCCompiler, ClangCPPCompiler, ClangObjCCompiler, @@ -493,11 +493,10 @@ class Environment: if found_cl in watcom_cls: continue arg = '/?' + elif 'armcc' in compiler[0]: + arg = '--vsn' else: - if compiler[0] == 'armcc': - arg = '--vsn' - else: - arg = '--version' + arg = '--version' try: p, out, err = Popen_safe(compiler + [arg]) except OSError as e: @@ -543,7 +542,7 @@ class Environment: 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: - cls = ARMCCompiler if lang == 'c' else ARMCPPCompiler + cls = ArmCCompiler if lang == 'c' else ArmCPPCompiler return cls(ccache + compiler, version, is_cross, exe_wrap, full_version=full_version) self._handle_exceptions(popen_exceptions, compilers) @@ -799,7 +798,7 @@ class Environment: if 'lib' in linker or 'lib.exe' in linker: arg = '/?' else: - arg = '--version' + arg = '--version' try: p, out, err = Popen_safe(linker + [arg]) except OSError as e: -- cgit v1.1