diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-06-04 14:07:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-04 14:07:27 +0300 |
commit | 62051626a5784e371ad63042425bb2444143ed7f (patch) | |
tree | 1a9b05413478e440a34269520a49ff067a544220 /mesonbuild/backend/backends.py | |
parent | 53e47d42f07e53f040ae68437f893032af3fea27 (diff) | |
parent | 4b428053f496720ec437eb5d455c86ada2de7977 (diff) | |
download | meson-62051626a5784e371ad63042425bb2444143ed7f.zip meson-62051626a5784e371ad63042425bb2444143ed7f.tar.gz meson-62051626a5784e371ad63042425bb2444143ed7f.tar.bz2 |
Merge pull request #1545 from centricular/dont-link-recursively
Don't add dependencies recursively while linking
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 4cfdd9e..3044ce6 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -453,15 +453,11 @@ class Backend: for d in deps: if not isinstance(d, (build.StaticLibrary, build.SharedLibrary)): raise RuntimeError('Tried to link with a non-library target "%s".' % d.get_basename()) - if isinstance(compiler, compilers.LLVMDCompiler) or isinstance(compiler, compilers.DmdDCompiler): - args += ['-L' + self.get_target_filename_for_linking(d)] + if isinstance(compiler, (compilers.LLVMDCompiler, compilers.DmdDCompiler)): + d_arg = '-L' + self.get_target_filename_for_linking(d) else: - args.append(self.get_target_filename_for_linking(d)) - # 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()) + d_arg = self.get_target_filename_for_linking(d) + args.append(d_arg) return args def determine_windows_extra_paths(self, target): |