1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 14:47:06 +00:00
nixpkgs/pkgs/development/tools/build-managers/meson/more-env-vars.patch
John Ericson 128b93e061 meson: Patch to ingest env vars like autoconf
See comment in code and the PR it references,
https://github.com/mesonbuild/meson/pull/6827, for details.

We can remove entries from the cross file because they will be gotten
from env vars now.
2020-04-28 10:11:41 -04:00

17 lines
724 B
Diff

diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
index ac13a710..e0d07c51 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
@@ -119,9 +119,9 @@ def get_env_var_pair(for_machine: MachineChoice,
# compiling we fall back on the unprefixed host version. This
# allows native builds to never need to worry about the 'BUILD_*'
# ones.
- ([var_name + '_FOR_BUILD'] if is_cross else [var_name]),
+ [var_name + '_FOR_BUILD'] + ([] if is_cross else [var_name]),
# Always just the unprefixed host verions
- ([] if is_cross else [var_name]),
+ [var_name],
)[for_machine]
for var in candidates:
value = os.environ.get(var)