diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-06-20 10:57:06 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-06-20 11:27:08 +0000 |
commit | 9fdf4d83e66f27715b1f0e3b7f86ad8c5c997024 (patch) | |
tree | 16d11d1ad10c843298fedd46582e96d18beebefd | |
parent | 58ae2c9a8c52bcf881682286cc4393d85c87a07f (diff) | |
download | meson-9fdf4d83e66f27715b1f0e3b7f86ad8c5c997024.zip meson-9fdf4d83e66f27715b1f0e3b7f86ad8c5c997024.tar.gz meson-9fdf4d83e66f27715b1f0e3b7f86ad8c5c997024.tar.bz2 |
pkgconfig dep: Special-case D link arguments
The D compiler does not implement find_library(), so we can't resolve
these libraries to absolute paths. Keep the old behaviour till that
can be done.
-rw-r--r-- | mesonbuild/dependencies/base.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 3e6ecc5..151d2b9 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -602,7 +602,10 @@ class PkgConfigDependency(ExternalDependency): # Libraries that are provided by the toolchain or are not found by # find_library() will be added with -L -l pairs. for lib in self._convert_mingw_paths(shlex.split(out)): - if lib.startswith('-L'): + if lib.startswith(('-L-l', '-L-L')): + # These are D language arguments, add them as-is + pass + elif lib.startswith('-L'): libpaths.add(lib[2:]) continue elif lib.startswith('-l'): @@ -610,7 +613,8 @@ class PkgConfigDependency(ExternalDependency): args = self.clib_compiler.find_library(lib[2:], self.env, list(libpaths), libtype) # If the project only uses a non-clib language such as D, Rust, - # C#, Python, etc, all we can do is limp along. + # C#, Python, etc, all we can do is limp along by adding the + # arguments as-is and then adding the libpaths at the end. else: args = None if args: |