aboutsummaryrefslogtreecommitdiff
path: root/ninjabackend.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-09-02 23:06:07 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-09-02 23:06:07 +0300
commit1c0a735e00e12140817432f5b1218f388f59b287 (patch)
tree7025dc3312b3f3458da20f2ea247cb356d0e49f7 /ninjabackend.py
parent8d45972ee3fedf5dc82be5d6801b4c61367acac9 (diff)
downloadmeson-1c0a735e00e12140817432f5b1218f388f59b287.zip
meson-1c0a735e00e12140817432f5b1218f388f59b287.tar.gz
meson-1c0a735e00e12140817432f5b1218f388f59b287.tar.bz2
Use static library dependencies not when the library is built but when it is used.
Diffstat (limited to 'ninjabackend.py')
-rw-r--r--ninjabackend.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ninjabackend.py b/ninjabackend.py
index 8659729..fecdbf3 100644
--- a/ninjabackend.py
+++ b/ninjabackend.py
@@ -1239,7 +1239,13 @@ rule FORTRAN_DEP_HACK
commands += linker.get_std_link_args()
else:
raise RuntimeError('Unknown build target type.')
- dependencies = target.get_dependencies()
+ # Link arguments of static libraries are not put in the command line of
+ # the library. They are instead appended to the command line where
+ # the static library is used.
+ if linker_base == 'STATIC':
+ dependencies = []
+ else:
+ dependencies = target.get_dependencies()
commands += self.build_target_link_arguments(linker, dependencies)
commands += target.link_args
# External deps must be last because target link libraries may depend on them.