diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-10-10 23:52:27 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-10-29 22:42:21 +0300 |
commit | 7a12c911bf5478b0a762432985535a6a823b13ab (patch) | |
tree | 21f2d6bee1efbc416a4d967bccfd493414e11fe7 | |
parent | 5e2c251eda2e2f0a5f71bd7f1f40acf968d63900 (diff) | |
download | meson-7a12c911bf5478b0a762432985535a6a823b13ab.zip meson-7a12c911bf5478b0a762432985535a6a823b13ab.tar.gz meson-7a12c911bf5478b0a762432985535a6a823b13ab.tar.bz2 |
Remove duplicated CEXE_MAPPING table
-rw-r--r-- | mesonbuild/compilers/compilers.py | 5 | ||||
-rw-r--r-- | mesonbuild/modules/unstable_external_project.py | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index a994fdb..4868ded 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -107,11 +107,6 @@ CFLAGS_MAPPING: T.Mapping[str, str] = { 'cython': 'CYTHONFLAGS', } -CEXE_MAPPING: T.Mapping = { - 'c': 'CC', - 'cpp': 'CXX', -} - # All these are only for C-linkable languages; see `clink_langs` above. def sort_clink(lang: str) -> int: diff --git a/mesonbuild/modules/unstable_external_project.py b/mesonbuild/modules/unstable_external_project.py index b8fd1b0..021c189 100644 --- a/mesonbuild/modules/unstable_external_project.py +++ b/mesonbuild/modules/unstable_external_project.py @@ -20,7 +20,8 @@ import typing as T from . import ExtensionModule, ModuleReturnValue, NewExtensionModule from .. import mlog, build -from ..compilers.compilers import CFLAGS_MAPPING, CEXE_MAPPING +from ..compilers.compilers import CFLAGS_MAPPING +from ..envconfig import ENV_VAR_PROG_MAP from ..dependencies import InternalDependency, PkgConfigDependency from ..interpreterbase import FeatureNew from ..interpreter.type_checking import ENV_KW @@ -135,11 +136,11 @@ class ExternalProject(NewExtensionModule): link_args: T.List[str] = [] self.run_env = os.environ.copy() for lang, compiler in self.env.coredata.compilers[MachineChoice.HOST].items(): - if any(lang not in i for i in (CEXE_MAPPING, CFLAGS_MAPPING)): + if any(lang not in i for i in (ENV_VAR_PROG_MAP, CFLAGS_MAPPING)): continue cargs = self.env.coredata.get_external_args(MachineChoice.HOST, lang) assert isinstance(cargs, list), 'for mypy' - self.run_env[CEXE_MAPPING[lang]] = self._quote_and_join(compiler.get_exelist()) + self.run_env[ENV_VAR_PROG_MAP[lang]] = self._quote_and_join(compiler.get_exelist()) self.run_env[CFLAGS_MAPPING[lang]] = self._quote_and_join(cargs) if not link_exelist: link_exelist = compiler.get_linker_exelist() |