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/clang.py | |
parent | b6dc4d5e5c6e838de0b52e62d982ba2547eb366d (diff) | |
download | meson-thinlto.tar.gz |
Add thinlto support. Closes #7493.thinlto
Diffstat (limited to 'mesonbuild/compilers/mixins/clang.py')
-rw-r--r-- | mesonbuild/compilers/mixins/clang.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/compilers/mixins/clang.py b/mesonbuild/compilers/mixins/clang.py index acdb3526e..773d9dc67 100644 --- a/mesonbuild/compilers/mixins/clang.py +++ b/mesonbuild/compilers/mixins/clang.py @@ -77,6 +77,13 @@ class ClangCompiler(GnuLikeCompiler): # so it might change semantics at any time. return ['-include-pch', os.path.join(pch_dir, self.get_pch_name(header))] + def get_lto_compile_args(self, lto_type: str) -> T.List[str]: + if lto_type == 'thin': + return ['-flto=thin'] + if lto_type == 'true': + return ['-flto'] + return [] + def get_compiler_check_args(self, mode: CompileCheckMode) -> T.List[str]: myargs = [] # type: T.List[str] if mode is CompileCheckMode.COMPILE: |