aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-01-21 11:15:14 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-01-27 23:42:22 +0530
commitdbcbf19ecea9d07d264dbbc1cd87ab22393be8a7 (patch)
treee00d94bf17cb98e7b61dab6afca8b1bd65cb6fa8 /mesonbuild/backend/backends.py
parent0e078adf5a7d47d5ad168f75e39d4a044032b197 (diff)
downloadmeson-dbcbf19ecea9d07d264dbbc1cd87ab22393be8a7.zip
meson-dbcbf19ecea9d07d264dbbc1cd87ab22393be8a7.tar.gz
meson-dbcbf19ecea9d07d264dbbc1cd87ab22393be8a7.tar.bz2
compilers: New class CompilerArgs derived from list()
The purpose of this class is to make it possible to sanely generate compiler command-lines by ensuring that new arguments appended or added to a list of arguments properly override previous arguments. For instance: >>> a = CompilerArgs(['-Lfoo', '-DBAR']) >>> a += ['-Lgah', '-DTAZ'] >>> print(a) ['-Lgah', '-Lfoo', '-DBAR', '-DTAZ'] Arguments will be de-duped if it is safe to do so. Currently, this is only done for -I and -L arguments (previous occurances are removed when a new one is added) and arguments that once added cannot be overriden such as -pipe are removed completely.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 6f8a50e..eadc8cc 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -360,7 +360,7 @@ class Backend:
for dep in target.get_external_deps():
# Cflags required by external deps might have UNIX-specific flags,
# so filter them out if needed
- commands += compiler.unix_compile_flags_to_native(dep.get_compile_args())
+ commands += compiler.unix_args_to_native(dep.get_compile_args())
if isinstance(target, build.Executable):
commands += dep.get_exe_args()