diff options
Diffstat (limited to 'mesonbuild/compilers/rust.py')
| -rw-r--r-- | mesonbuild/compilers/rust.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index ab0706d26..7ad7f34e9 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -11,6 +11,7 @@ import re import typing as T from .. import options +from ..dependencies import InternalDependency from ..mesonlib import EnvironmentException, MesonException, Popen_safe_logged, version_compare from ..linkers.linkers import VisualStudioLikeLinkerMixin from ..options import OptionKey @@ -73,6 +74,11 @@ def rustc_link_args(args: T.List[str]) -> T.List[str]: rustc_args.append(f'link-arg={arg}') return rustc_args + +class RustSystemDependency(InternalDependency): + pass + + class RustCompiler(Compiler): # rustc doesn't invoke the compiler itself, it doesn't need a LINKER_PREFIX @@ -323,6 +329,8 @@ class RustCompiler(Compiler): return opts def get_dependency_compile_args(self, dep: 'Dependency') -> T.List[str]: + if isinstance(dep, RustSystemDependency): + return dep.get_compile_args() # Rust doesn't have dependency compile arguments so simply return # nothing here. Dependencies are linked and all required metadata is # provided by the linker flags. |
