diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-03 20:42:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-03 20:42:21 +0300 |
commit | 7ec9e81e6f6e0bebdc0b10b0f513768ff94dec37 (patch) | |
tree | 8899829a2520f622fc53f46dff01fadec8f13a87 /mesonbuild/environment.py | |
parent | 558a7bc6ff875f233b2ab7531e59e296b98032bd (diff) | |
parent | d569d0bb3cf54620ddbd56485ebb700be8ffcf94 (diff) | |
download | meson-7ec9e81e6f6e0bebdc0b10b0f513768ff94dec37.zip meson-7ec9e81e6f6e0bebdc0b10b0f513768ff94dec37.tar.gz meson-7ec9e81e6f6e0bebdc0b10b0f513768ff94dec37.tar.bz2 |
Merge pull request #8606 from dcbaker/submit/fix-for-build-env-variables
Fix _FOR_BUILD env variables
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 373c063..32b3d8f 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -798,11 +798,7 @@ class Environment: env_opts: T.DefaultDict[OptionKey, T.List[str]] = collections.defaultdict(list) - if self.is_cross_build(): - for_machine = MachineChoice.BUILD - else: - for_machine = MachineChoice.HOST - for evar, keyname in opts: + for (evar, keyname), for_machine in itertools.product(opts, MachineChoice): p_env = _get_env_var(for_machine, self.is_cross_build(), evar) if p_env is not None: # these may contain duplicates, which must be removed, else @@ -832,7 +828,7 @@ class Environment: key = key.evolve(lang=lang) env_opts[key].extend(p_list) elif keyname == 'cppflags': - key = OptionKey('args', machine=for_machine, lang='c') + key = OptionKey('env_args', machine=for_machine, lang='c') for lang in compilers.compilers.LANGUAGES_USING_CPPFLAGS: key = key.evolve(lang=lang) env_opts[key].extend(p_list) |