aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorGuillaume Poirier-Morency <guillaumepoiriermorency@gmail.com>2016-10-26 12:13:36 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2017-04-22 21:56:43 +0300
commitaa486f5bb2b962ee6f5f65cabe05bb33f92ebead (patch)
tree991cf99ef581d84fc60f3316415598286f96c1b6 /mesonbuild/environment.py
parent33b5ddf35e4c3f7a651f3fff13b0c4227c87e225 (diff)
downloadmeson-aa486f5bb2b962ee6f5f65cabe05bb33f92ebead.zip
meson-aa486f5bb2b962ee6f5f65cabe05bb33f92ebead.tar.gz
meson-aa486f5bb2b962ee6f5f65cabe05bb33f92ebead.tar.bz2
vala: Add 'VALAFLAGS' to considered environment variables
Fix precedence of arguments for Vala tasks and include those considered external (i.e. '-Dvala_args' and 'VALAFLAGS').
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index cb28897..61425a4 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -809,16 +809,18 @@ def get_args_from_envvars(compiler):
if hasattr(compiler, 'get_linker_exelist'):
compiler_is_linker = (compiler.get_exelist() == compiler.get_linker_exelist())
- if lang not in ('c', 'cpp', 'objc', 'objcpp', 'fortran', 'd'):
- return [], [], []
-
# Compile flags
cflags_mapping = {'c': 'CFLAGS',
'cpp': 'CXXFLAGS',
'objc': 'OBJCFLAGS',
'objcpp': 'OBJCXXFLAGS',
'fortran': 'FFLAGS',
- 'd': 'DFLAGS'}
+ 'd': 'DFLAGS',
+ 'vala': 'VALAFLAGS'}
+
+ if lang not in cflags_mapping.keys():
+ return [], [], []
+
compile_flags = os.environ.get(cflags_mapping[lang], '')
log_var(cflags_mapping[lang], compile_flags)
compile_flags = shlex.split(compile_flags)