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/backend/ninjabackend.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/backend/ninjabackend.py')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 628718f..5bd660c 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2071,7 +2071,7 @@ rule FORTRAN_DEP_HACK custom_target_libraries = self.get_custom_target_provided_libraries(target) commands += extra_args commands += custom_target_libraries - commands = linker.unix_link_flags_to_native(self.dedup_arguments(commands)) + commands = linker.unix_args_to_native(self.dedup_arguments(commands)) dep_targets = [self.get_dependency_filename(t) for t in dependencies] dep_targets += [os.path.join(self.environment.source_dir, target.subdir, t) for t in target.link_depends] |