diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2023-04-13 16:09:03 +0300 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2023-04-14 06:11:44 -0400 |
commit | 49e62877d14fee68baf854fde3c13f58a97384de (patch) | |
tree | 654cfc75d5427202a2a4fac2b02a923e68a0fe45 /mesonbuild | |
parent | 93cafe7b14c23ba4b6ef59267c584714afb8f0e8 (diff) | |
download | meson-49e62877d14fee68baf854fde3c13f58a97384de.zip meson-49e62877d14fee68baf854fde3c13f58a97384de.tar.gz meson-49e62877d14fee68baf854fde3c13f58a97384de.tar.bz2 |
rust: Don't pass dependency compile arguments to the compiler
Rust doesn't have a concept of dependency compile arguments, i.e.
something like headers. Dependencies are linked in and all required
metadata is provided by the linker flags.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/compilers/rust.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 2d158e3..1c43f7a 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -28,6 +28,7 @@ if T.TYPE_CHECKING: from ..linkers import DynamicLinker from ..mesonlib import MachineChoice from ..programs import ExternalProgram + from ..dependencies import Dependency rust_optimization_args = { @@ -153,6 +154,12 @@ class RustCompiler(Compiler): ), } + def get_dependency_compile_args(self, dep: 'Dependency') -> T.List[str]: + # 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. + return [] + def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: args = [] key = OptionKey('std', machine=self.for_machine, lang=self.language) |