aboutsummaryrefslogtreecommitdiff
path: root/backends.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-10-18 14:23:45 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-10-18 14:23:45 +0300
commit74d6502de2692b69ae0e9ac9b33f004bb6bf88e7 (patch)
tree1ec63a8bbab66c06fb5ae51a0adf17ee495e7ff1 /backends.py
parent0abc1b1badde962a99b924b3eec0a3398aa91697 (diff)
downloadmeson-74d6502de2692b69ae0e9ac9b33f004bb6bf88e7.zip
meson-74d6502de2692b69ae0e9ac9b33f004bb6bf88e7.tar.gz
meson-74d6502de2692b69ae0e9ac9b33f004bb6bf88e7.tar.bz2
Workaround for Clang linker bug where it can not find shared libraries in rpath directories. The solution is to specify all linker targets every time.
Diffstat (limited to 'backends.py')
-rw-r--r--backends.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/backends.py b/backends.py
index 577e1b8..2ec4d47 100644
--- a/backends.py
+++ b/backends.py
@@ -286,6 +286,11 @@ class Backend():
if fname.endswith('dll'):
fname = fname[:-3] + 'lib'
args.append(fname)
+ # If you have executable e that links to shared lib s1 that links to shared library s2
+ # you have to specify s2 as well as s1 when linking e even if e does not directly use
+ # s2. Gcc handles this case fine but Clang does not for some reason. Thus we need to
+ # explictly specify all libraries every time.
+ args += self.build_target_link_arguments(compiler, d.get_dependencies())
return args
def generate_configure_files(self):