diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-21 12:05:38 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-28 05:09:51 +0530 |
commit | 2bb58c909fd80cc8ce053b5f1b6565bd28a416d2 (patch) | |
tree | b6510bc5f6585087e18f90f23b0c2fd1d4ac1150 /mesonbuild/dependencies.py | |
parent | dbcbf19ecea9d07d264dbbc1cd87ab22393be8a7 (diff) | |
download | meson-2bb58c909fd80cc8ce053b5f1b6565bd28a416d2.zip meson-2bb58c909fd80cc8ce053b5f1b6565bd28a416d2.tar.gz meson-2bb58c909fd80cc8ce053b5f1b6565bd28a416d2.tar.bz2 |
Use CompilerArgs for generation of compile commands
At the same time, also fix the order in which compile arguments are
added. Detailed comments have been added concerning the priority and
order of the arguments.
Also adds a unit test and an integration test for the same.
Diffstat (limited to 'mesonbuild/dependencies.py')
-rw-r--r-- | mesonbuild/dependencies.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index 6ae91d4..b01e0a8 100644 --- a/mesonbuild/dependencies.py +++ b/mesonbuild/dependencies.py @@ -59,7 +59,7 @@ class Dependency: def get_name(self): return self.name - def get_exe_args(self): + def get_exe_args(self, compiler): return [] def need_threads(self): @@ -1045,16 +1045,14 @@ class QtBaseDependency(Dependency): def found(self): return self.is_found - def get_exe_args(self): + def get_exe_args(self, compiler): # Originally this was -fPIE but nowadays the default # for upstream and distros seems to be -reduce-relocations # which requires -fPIC. This may cause a performance # penalty when using self-built Qt or on platforms # where -fPIC is not required. If this is an issue # for you, patches are welcome. - if mesonlib.is_linux(): - return ['-fPIC'] - return [] + return compiler.get_pic_args() class Qt5Dependency(QtBaseDependency): def __init__(self, env, kwargs): |