diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-20 22:04:24 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-20 22:04:24 +0200 |
commit | d87eb7d2905eaa9ed7bac60945821c7b039298d8 (patch) | |
tree | 65dd79f54b021f800f258410aca28bb151e0aa48 /mesonbuild/environment.py | |
parent | 9071c8fc454f5f56060bb979fa3ea01cc61e6ffb (diff) | |
parent | a405f7a4994d7823b0e4429438e78a6b3dadecdc (diff) | |
download | meson-d87eb7d2905eaa9ed7bac60945821c7b039298d8.zip meson-d87eb7d2905eaa9ed7bac60945821c7b039298d8.tar.gz meson-d87eb7d2905eaa9ed7bac60945821c7b039298d8.tar.bz2 |
Merge branch 'base_options'.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 61954af..c381ab5 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -222,7 +222,11 @@ class Environment(): gtype = GCC_STANDARD return GnuCCompiler(ccache + [compiler], version, gtype, is_cross, exe_wrap) if 'clang' in out: - return ClangCCompiler(ccache + [compiler], version, is_cross, exe_wrap) + if 'Apple' in out: + cltype = CLANG_OSX + else: + cltype = CLANG_STANDARD + return ClangCCompiler(ccache + [compiler], version, cltype, is_cross, exe_wrap) if 'Microsoft' in out or 'Microsoft' in err: # Visual Studio prints version number to stderr but # everything else to stdout. Why? Lord only knows. @@ -346,7 +350,11 @@ class Environment(): gtype = GCC_STANDARD return GnuCPPCompiler(ccache + [compiler], version, gtype, is_cross, exe_wrap) if 'clang' in out: - return ClangCPPCompiler(ccache + [compiler], version, is_cross, exe_wrap) + if 'Apple' in out: + cltype = CLANG_OSX + else: + cltype = CLANG_STANDARD + return ClangCPPCompiler(ccache + [compiler], version, cltype, is_cross, exe_wrap) if 'Microsoft' in out or 'Microsoft' in err: version = re.search(Environment.version_regex, err).group() return VisualStudioCPPCompiler([compiler], version, is_cross, exe_wrap) @@ -377,7 +385,7 @@ class Environment(): 'Free Software Foundation' in out: return GnuObjCCompiler(exelist, version, is_cross, exe_wrap) if out.startswith('Apple LLVM'): - return ClangObjCCompiler(exelist, version, is_cross, exe_wrap) + return ClangObjCCompiler(exelist, version, CLANG_OSX, is_cross, exe_wrap) if 'apple' in out and 'Free Software Foundation' in out: return GnuObjCCompiler(exelist, version, is_cross, exe_wrap) raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"') @@ -407,7 +415,7 @@ class Environment(): 'Free Software Foundation' in out: return GnuObjCPPCompiler(exelist, version, is_cross, exe_wrap) if out.startswith('Apple LLVM'): - return ClangObjCPPCompiler(exelist, version, is_cross, exe_wrap) + return ClangObjCPPCompiler(exelist, version, CLANG_OSX, is_cross, exe_wrap) if 'apple' in out and 'Free Software Foundation' in out: return GnuObjCPPCompiler(exelist, version, is_cross, exe_wrap) raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"') |