diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-21 11:15:14 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-27 23:42:22 +0530 |
commit | dbcbf19ecea9d07d264dbbc1cd87ab22393be8a7 (patch) | |
tree | e00d94bf17cb98e7b61dab6afca8b1bd65cb6fa8 /mesonbuild/build.py | |
parent | 0e078adf5a7d47d5ad168f75e39d4a044032b197 (diff) | |
download | meson-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/build.py')
0 files changed, 0 insertions, 0 deletions