aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py19
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 [], [], []