From 476c2639521b57184565d85f85e94862d0be7269 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 23 Apr 2017 01:11:25 +0300 Subject: Unset compiler envvars in unit tests. --- mesonbuild/environment.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'mesonbuild/environment.py') 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 [], [], [] -- cgit v1.1