···11diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
22-index ac13a710..e0d07c51 100644
22+index 17058df6b..7a68b7f15 100644
33--- a/mesonbuild/envconfig.py
44+++ b/mesonbuild/envconfig.py
55-@@ -119,9 +119,9 @@ def get_env_var_pair(for_machine: MachineChoice,
55+@@ -120,7 +120,7 @@ def get_env_var_pair(for_machine: MachineChoice,
66 # compiling we fall back on the unprefixed host version. This
77 # allows native builds to never need to worry about the 'BUILD_*'
88 # ones.
99- ([var_name + '_FOR_BUILD'] if is_cross else [var_name]),
1010+ [var_name + '_FOR_BUILD'] + ([] if is_cross else [var_name]),
1111 # Always just the unprefixed host verions
1212-- ([] if is_cross else [var_name]),
1313-+ [var_name],
1212+ [var_name]
1413 )[for_machine]
1515- for var in candidates:
1616- value = os.environ.get(var)