diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2023-07-04 23:55:19 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-07-05 07:17:26 -0400 |
commit | 8369dbbfecafa87629f0624e6dc7c9cd235043a4 (patch) | |
tree | 4b7595c6989780e59a069e93eaf687aff124a2e1 | |
parent | d391e5281c982899e17c7a5ceeca30262f1640ea (diff) | |
download | meson-8369dbbfecafa87629f0624e6dc7c9cd235043a4.zip meson-8369dbbfecafa87629f0624e6dc7c9cd235043a4.tar.gz meson-8369dbbfecafa87629f0624e6dc7c9cd235043a4.tar.bz2 |
build: use self.compilers instead of all_compilers for stdlib langs
We need a union of the compilers used by the target, and by those used
by all dependencies, not all the compilers in all projects. We do,
however, need to look compilers up from all possible compilers, as a
dependency that is a subproject could use a language not present in the
current project.
-rw-r--r-- | mesonbuild/build.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 8f85e15..d9e0480 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1630,10 +1630,13 @@ You probably should put it in link_with instead.''') def get_used_stdlib_args(self, link_language: str) -> T.List[str]: all_compilers = self.environment.coredata.compilers[self.for_machine] - all_langs = set(all_compilers).union(self.get_langs_used_by_deps()) + all_langs = set(self.compilers).union(self.get_langs_used_by_deps()) stdlib_args: T.List[str] = [] for dl in all_langs: if dl != link_language and (dl, link_language) not in self._MASK_LANGS: + # We need to use all_compilers here because + # get_langs_used_by_deps could return a language from a + # subproject stdlib_args.extend(all_compilers[dl].language_stdlib_only_link_flags(self.environment)) return stdlib_args |