diff options
| author | Sam James <sam@gentoo.org> | 2025-03-12 04:40:34 +0000 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-11-09 12:37:40 +0200 |
| commit | c05456a9af176f351c454bcdb567270d89f5e681 (patch) | |
| tree | b53a3cdb6864fa91099100805a0e855ad754bddd /mesonbuild/compilers | |
| parent | af3c6dd72a3e55598150cd3e922b11cc3a00b95e (diff) | |
| download | meson-c05456a9af176f351c454bcdb567270d89f5e681.tar.gz | |
compilers: gnu: clean up get_lto_link_args
... by calling self.get_lto_compile_args, as we expect the same arguments
to be passed at both compile-time and link-time, and we're doing the exact
same procedure to determine -flto=XXX.
Bug: https://github.com/mesonbuild/meson/issues/9536
Diffstat (limited to 'mesonbuild/compilers')
| -rw-r--r-- | mesonbuild/compilers/mixins/gnu.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py index fa34bb4ca..ed937338f 100644 --- a/mesonbuild/compilers/mixins/gnu.py +++ b/mesonbuild/compilers/mixins/gnu.py @@ -639,17 +639,7 @@ class GnuCompiler(GnuLikeCompiler): def get_lto_link_args(self, *, threads: int = 0, mode: str = 'default', thinlto_cache_dir: T.Optional[str] = None) -> T.List[str]: args: T.List[str] = [] - if threads == 0: - if self._has_lto_auto_support: - args.append('-flto=auto') - else: - # This matches gcc's behavior of using the number of cpus, but - # obeying meson's MESON_NUM_PROCESSES convention. - args.append(f'-flto={mesonlib.determine_worker_count()}') - elif threads > 0: - args.append(f'-flto={threads}') - else: - args.extend(super().get_lto_compile_args(threads=threads)) + args.extend(self.get_lto_compile_args(threads=threads)) return args def get_profile_use_args(self) -> T.List[str]: |
