diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-08-30 17:55:39 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-09-01 01:05:48 +0300 |
commit | 388cb0f805ec9ee54ab721fad28f51a842e66186 (patch) | |
tree | f144349c072725f113374a32eec28ce0d520971f /mesonbuild/envconfig.py | |
parent | e121cd123ccc1ee2f33a76d736ee91770a0debe2 (diff) | |
download | meson-388cb0f805ec9ee54ab721fad28f51a842e66186.zip meson-388cb0f805ec9ee54ab721fad28f51a842e66186.tar.gz meson-388cb0f805ec9ee54ab721fad28f51a842e66186.tar.bz2 |
env2mfile: reuse logical lists of interesting facts from meson itself
Meson internally knows about many languages and tools, and *FLAGS
variables, and which languages to use them for. Instead of duplicating
this logic, import it from mesonbuild.*
This logic was originally standalone, but now that it is merged into the
Meson tree we can have a single source of truth.
Diffstat (limited to 'mesonbuild/envconfig.py')
-rw-r--r-- | mesonbuild/envconfig.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index 97f7264..d6d9c47 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -90,7 +90,7 @@ CPU_FAMILIES_64_BIT = [ ] # Map from language identifiers to environment variables. -ENV_VAR_PROG_MAP: T.Mapping[str, str] = { +ENV_VAR_COMPILER_MAP: T.Mapping[str, str] = { # Compilers 'c': 'CC', 'cpp': 'CXX', @@ -110,7 +110,10 @@ ENV_VAR_PROG_MAP: T.Mapping[str, str] = { 'objc_ld': 'OBJC_LD', 'objcpp_ld': 'OBJCXX_LD', 'rust_ld': 'RUSTC_LD', +} +# Map from utility names to environment variables. +ENV_VAR_TOOL_MAP: T.Mapping[str, str] = { # Binutils 'ar': 'AR', 'as': 'AS', @@ -135,6 +138,8 @@ ENV_VAR_PROG_MAP: T.Mapping[str, str] = { 'llvm-config': 'LLVM_CONFIG', } +ENV_VAR_PROG_MAP = {**ENV_VAR_COMPILER_MAP, **ENV_VAR_TOOL_MAP} + # Deprecated environment variables mapped from the new variable to the old one # Deprecated in 0.54.0 DEPRECATED_ENV_PROG_MAP: T.Mapping[str, str] = { |