diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-11-07 16:00:56 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-11-07 22:02:32 +0200 |
commit | fb2eda0274f67f501be1f11a3bc8cb497cefa10f (patch) | |
tree | e7afc27cf35beffdf37a4e67ad99741ce0fb8718 /mesonbuild/compilers/mixins/gnu.py | |
parent | b6dc4d5e5c6e838de0b52e62d982ba2547eb366d (diff) | |
download | meson-thinlto.tar.gz |
Add thinlto support. Closes #7493.thinlto
Diffstat (limited to 'mesonbuild/compilers/mixins/gnu.py')
-rw-r--r-- | mesonbuild/compilers/mixins/gnu.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py index bb1fc6631..5771ad811 100644 --- a/mesonbuild/compilers/mixins/gnu.py +++ b/mesonbuild/compilers/mixins/gnu.py @@ -295,8 +295,10 @@ class GnuLikeCompiler(Compiler, metaclass=abc.ABCMeta): return self._split_fetch_real_dirs(line.split('=', 1)[1]) return [] - def get_lto_compile_args(self) -> T.List[str]: - return ['-flto'] + def get_lto_compile_args(self, lto_type: str) -> T.List[str]: + if lto_type != 'false': + return ['-flto'] + return [] def sanitizer_compile_args(self, value: str) -> T.List[str]: if value == 'none': |