diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-11-07 16:00:56 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-11-08 16:00:05 +0200 |
commit | 3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d (patch) | |
tree | e7afc27cf35beffdf37a4e67ad99741ce0fb8718 /mesonbuild/linkers.py | |
parent | b6dc4d5e5c6e838de0b52e62d982ba2547eb366d (diff) | |
download | meson-3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.zip meson-3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.tar.gz meson-3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d.tar.bz2 |
Add thinlto support. Closes #7493.
Diffstat (limited to 'mesonbuild/linkers.py')
-rw-r--r-- | mesonbuild/linkers.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py index 589945c..cc3db5f 100644 --- a/mesonbuild/linkers.py +++ b/mesonbuild/linkers.py @@ -411,7 +411,7 @@ class DynamicLinker(LinkerEnvVarsMixin, metaclass=abc.ABCMeta): m = 'Linker {} does not support position-independent executable' raise mesonlib.EnvironmentException(m.format(self.id)) - def get_lto_args(self) -> T.List[str]: + def get_lto_args(self, lto_type: str) -> T.List[str]: return [] def sanitizer_args(self, value: str) -> T.List[str]: @@ -550,8 +550,10 @@ class GnuLikeDynamicLinkerMixin: def get_allow_undefined_args(self) -> T.List[str]: return self._apply_prefix('--allow-shlib-undefined') - def get_lto_args(self) -> T.List[str]: - return ['-flto'] + def get_lto_args(self, lto_type: str) -> T.List[str]: + if lto_type != 'false': + return ['-flto'] + return [] def sanitizer_args(self, value: str) -> T.List[str]: if value == 'none': |