diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-10-23 18:46:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-23 18:46:40 +0200 |
commit | cc4a9bcf35eafb56a48545b700b064c2231d48f2 (patch) | |
tree | ccc17381b0368b2c0ace11c7d1a864f0a1221e1e /mesonbuild/dependencies/base.py | |
parent | 562c50f229cfe0a28abdfc2c56360f5a82c83b57 (diff) | |
parent | 9262236322140f0b2cb94a53baeb67188c247f59 (diff) | |
download | meson-cc4a9bcf35eafb56a48545b700b064c2231d48f2.zip meson-cc4a9bcf35eafb56a48545b700b064c2231d48f2.tar.gz meson-cc4a9bcf35eafb56a48545b700b064c2231d48f2.tar.bz2 |
Merge pull request #2516 from dcbaker/submit/llvm-fix-lib-path
LLVM: Don't add -L<system path> to link args
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r-- | mesonbuild/dependencies/base.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 0d9742d..9913a0b 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -640,3 +640,14 @@ def find_external_dependency(name, env, kwargs): raise pkg_exc mlog.log('Dependency', mlog.bold(name), 'found:', mlog.red('NO')) return pkgdep + + +def strip_system_libdirs(environment, link_args): + """Remove -L<system path> arguments. + + leaving these in will break builds where a user has a version of a library + in the system path, and a different version not in the system path if they + want to link against the non-system path version. + """ + exclude = {'-L{}'.format(p) for p in environment.get_compiler_system_dirs()} + return [l for l in link_args if l not in exclude] |