diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-11-29 00:12:36 +0100 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-12-01 09:37:23 -0800 |
| commit | 2e14cdd18efb15845d42ba458dce65fcaa533e39 (patch) | |
| tree | 0f1940e0fc7cc64435424ace9531df48442ce649 /mesonbuild/compilers/rust.py | |
| parent | bd80d29dca43dec0b0fc490d6bec0dc853f9967b (diff) | |
| download | meson-2e14cdd18efb15845d42ba458dce65fcaa533e39.tar.gz | |
compilers: pass target to get_lto_*_args
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/compilers/rust.py')
| -rw-r--r-- | mesonbuild/compilers/rust.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 4088b5ca9..b09522f37 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -365,13 +365,14 @@ class RustCompiler(Compiler): else: return ['-C', 'embed-bitcode=no'] - def get_lto_compile_args(self, *, threads: int = 0, mode: str = 'default') -> T.List[str]: + def get_lto_compile_args(self, *, target: T.Optional[BuildTarget] = None, threads: int = 0, + mode: str = 'default') -> T.List[str]: # TODO: what about -Clinker-plugin-lto? rustc_lto = 'lto=thin' if mode == 'thin' else 'lto' return ['-C', rustc_lto] - def get_lto_link_args(self, *, threads: int = 0, mode: str = 'default', - thinlto_cache_dir: T.Optional[str] = None) -> T.List[str]: + def get_lto_link_args(self, *, target: T.Optional[BuildTarget] = None, threads: int = 0, + mode: str = 'default', thinlto_cache_dir: T.Optional[str] = None) -> T.List[str]: # no need to specify anything because the rustc command line # includes the result of get_lto_compile_args() return [] |
