aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-06-05 17:58:12 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-18 06:33:23 +0000
commite3757e3d3cf24327c89dd3fc40f6cc933510f676 (patch)
treed32e8092736c581a5c264d08bc473d62715e4fe2 /mesonbuild/compilers/c.py
parent5467eed186c0576704b3d6de2e8d2d8a8ca6ad35 (diff)
downloadmeson-e3757e3d3cf24327c89dd3fc40f6cc933510f676.zip
meson-e3757e3d3cf24327c89dd3fc40f6cc933510f676.tar.gz
meson-e3757e3d3cf24327c89dd3fc40f6cc933510f676.tar.bz2
pkgconfig deps: Also resolve paths to shared libraries
This allows us to more aggressively de-dup them, and also sets RPATHs to all libraries that are not in the system linker paths so that binaries can be run uninstalled without any special steps. These RPATHs will be wiped on install, so they do not affect reproducible builds. De-duping: Fixes https://github.com/mesonbuild/meson/issues/2150 Fixes https://github.com/mesonbuild/meson/issues/2118 Fixes https://github.com/mesonbuild/meson/issues/3071 RPATHs: Fixes https://github.com/mesonbuild/meson/issues/314 Fixes https://github.com/mesonbuild/meson/issues/2881 Also fixes the uninstalled usage portions of: https://github.com/mesonbuild/meson/issues/3038 https://github.com/mesonbuild/meson/issues/3077
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r--mesonbuild/compilers/c.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index ef67e03..37e6a3a 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -843,7 +843,7 @@ class CCompiler(Compiler):
# First try if we can just add the library as -l.
# Gcc + co seem to prefer builtin lib dirs to -L dirs.
# Only try to find std libs if no extra dirs specified.
- if not extra_dirs and libtype == 'default':
+ if not extra_dirs:
args = ['-l' + libname]
if self.links(code, env, extra_args=args):
return args
@@ -861,6 +861,7 @@ class CCompiler(Compiler):
trial = os.path.join(d, prefix + libname + '.' + suffix)
if os.path.isfile(trial):
return [trial]
+ # XXX: For OpenBSD and macOS we (may) need to search for libfoo.x.y.z.dylib
return None
def find_library_impl(self, libname, env, extra_dirs, code, libtype):