diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-23 01:11:25 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-23 02:00:28 +0300 |
commit | 476c2639521b57184565d85f85e94862d0be7269 (patch) | |
tree | 767cd7c48cdec135ce2bbfa44f811916ee0bdca3 /mesonbuild/environment.py | |
parent | aa486f5bb2b962ee6f5f65cabe05bb33f92ebead (diff) | |
download | meson-476c2639521b57184565d85f85e94862d0be7269.zip meson-476c2639521b57184565d85f85e94862d0be7269.tar.gz meson-476c2639521b57184565d85f85e94862d0be7269.tar.bz2 |
Unset compiler envvars in unit tests.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 61425a4..3152d5d 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -24,6 +24,16 @@ import shutil build_filename = 'meson.build' +# Environment variables that each lang uses. +cflags_mapping = {'c': 'CFLAGS', + 'cpp': 'CXXFLAGS', + 'objc': 'OBJCFLAGS', + 'objcpp': 'OBJCXXFLAGS', + 'fortran': 'FFLAGS', + 'd': 'DFLAGS', + 'vala': 'VALAFLAGS'} + + def find_coverage_tools(): gcovr_exe = 'gcovr' lcov_exe = 'lcov' @@ -809,15 +819,6 @@ def get_args_from_envvars(compiler): if hasattr(compiler, 'get_linker_exelist'): compiler_is_linker = (compiler.get_exelist() == compiler.get_linker_exelist()) - # Compile flags - cflags_mapping = {'c': 'CFLAGS', - 'cpp': 'CXXFLAGS', - 'objc': 'OBJCFLAGS', - 'objcpp': 'OBJCXXFLAGS', - 'fortran': 'FFLAGS', - 'd': 'DFLAGS', - 'vala': 'VALAFLAGS'} - if lang not in cflags_mapping.keys(): return [], [], [] |