diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-07-24 13:44:43 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-08-03 00:52:18 +0300 |
commit | 6d939c67370e2fc3f4d4607864ed4addbef22cb7 (patch) | |
tree | 8930822ef644b18d9d4ae212724654009ed71b0e /mesonbuild/build.py | |
parent | 00a3d1ac4f86c85b3e0ba8e929e34547d20a0134 (diff) | |
download | meson-6d939c67370e2fc3f4d4607864ed4addbef22cb7.zip meson-6d939c67370e2fc3f4d4607864ed4addbef22cb7.tar.gz meson-6d939c67370e2fc3f4d4607864ed4addbef22cb7.tar.bz2 |
Consider link_whole_targets when determining linker
Currently if a target uses link_whole, and one of those archives is a
C++, but the files for the target are C linking will fail when the C
linker attempts to link the C++ files. This patches add
link_whole_targets to the list of languages in the target so the correct
linker will be selected.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 58cf987..94f177a 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -14,6 +14,7 @@ import copy, os, re from collections import OrderedDict +import itertools from . import environment from . import dependencies @@ -936,7 +937,7 @@ You probably should put it in link_with instead.''') langs.append(dep.language) # Check if any of the internal libraries this target links to were # written in this language - for link_target in self.link_targets: + for link_target in itertools.chain(self.link_targets, self.link_whole_targets): for language in link_target.compilers: if language not in langs: langs.append(language) |