diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-09 19:11:49 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-09 19:11:49 +0200 |
commit | fff79b081004b013159ee70ee982f7c8e3441b53 (patch) | |
tree | e0e2109d6a3843546682fc51ffb5c6a4248a2b59 /environment.py | |
parent | 6b563521feea33ff962abf7406ec3f1fcadca6cd (diff) | |
parent | 1e83db2ff3a5de8c6c6e9ac5665a202cd17a575d (diff) | |
download | meson-fff79b081004b013159ee70ee982f7c8e3441b53.zip meson-fff79b081004b013159ee70ee982f7c8e3441b53.tar.gz meson-fff79b081004b013159ee70ee982f7c8e3441b53.tar.bz2 |
Merge branch 'master' of ssh://git.code.sf.net/p/meson/code
Diffstat (limited to 'environment.py')
-rw-r--r-- | environment.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/environment.py b/environment.py index dafb5a7..557b95d 100644 --- a/environment.py +++ b/environment.py @@ -600,6 +600,9 @@ class ClangCCompiler(CCompiler): def get_pch_suffix(self): return 'pch' + def build_rpath_args(self, build_dir, rpath_paths): + return ['-Wl,-rpath,' + ':'.join([os.path.join(build_dir, p) for p in rpath_paths])] + class GnuCPPCompiler(CPPCompiler): std_warn_flags = ['-Wall', '-Winvalid-pch'] std_opt_flags = ['-O2'] @@ -648,6 +651,11 @@ class ClangCPPCompiler(CPPCompiler): def get_pch_suffix(self): return 'pch' + def build_rpath_args(self, build_dir, rpath_paths): + if len(rpath_paths) == 0: + return [] + return ['-Wl,-rpath,' + ':'.join([os.path.join(build_dir, p) for p in rpath_paths])] + class VisualStudioLinker(): always_flags = ['/NOLOGO'] def __init__(self, exelist): @@ -911,7 +919,7 @@ class Environment(): if (out.startswith('cc') or 'gcc' in out) and \ 'Free Software Foundation' in out: return GnuCCompiler(ccache + [compiler], version, GCC_STANDARD, is_cross, exe_wrap) - if (out.startswith('clang')): + if 'clang' in out: return ClangCCompiler(ccache + [compiler], version, is_cross, exe_wrap) if 'Microsoft' in out: # Visual Studio prints version number to stderr but @@ -969,7 +977,7 @@ class Environment(): return GnuCPPCompiler(ccache + [compiler], version, is_cross, exe_wrap) if 'apple' in out and 'Free Software Foundation' in out: return GnuCPPCompiler(ccache + [compiler], version, is_cross, exe_wrap) - if out.startswith('clang'): + if 'clang' in out: return ClangCPPCompiler(ccache + [compiler], version, is_cross, exe_wrap) if 'Microsoft' in out: version = re.search(Environment.version_regex, err).group() |