aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-11-07 16:00:56 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-11-08 16:00:05 +0200
commit3e6fbde94c1cb8d4e01b7daf0282c315ff0e6c7d (patch)
treee7afc27cf35beffdf37a4e67ad99741ce0fb8718 /mesonbuild/linkers.py
parentb6dc4d5e5c6e838de0b52e62d982ba2547eb366d (diff)
downloadmeson-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.py8
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':