diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2019-08-21 13:12:30 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2019-10-07 12:08:20 -0700 |
| commit | 0c22798b1ad4678abb205280060175678a790c4a (patch) | |
| tree | e58a51d87bffe1ecd6437f85adc0adefbed469d6 /mesonbuild/compilers/rust.py | |
| parent | ff4a17dbef08a1d8afd075f57dbab0f5c76951ab (diff) | |
| download | meson-0c22798b1ad4678abb205280060175678a790c4a.tar.gz | |
compilers: replace CompilerType with MachineInfo
Now that the linkers are split out of the compilers this enum is
only used to know what platform we're compiling for. Which is
what the MachineInfo class is for
Diffstat (limited to 'mesonbuild/compilers/rust.py')
| -rw-r--r-- | mesonbuild/compilers/rust.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 479c5a788..a17b697cb 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -19,6 +19,7 @@ from ..mesonlib import EnvironmentException, MachineChoice, Popen_safe from .compilers import Compiler, rust_buildtype_args, clike_debug_args if typing.TYPE_CHECKING: + from ..envconfig import MachineInfo from ..environment import Environment # noqa: F401 rust_optimization_args = {'0': [], @@ -30,9 +31,13 @@ rust_optimization_args = {'0': [], } class RustCompiler(Compiler): - def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrapper=None, **kwargs): + + LINKER_PREFIX = '-Wl,' + + def __init__(self, exelist, version, for_machine: MachineChoice, + is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs): self.language = 'rust' - super().__init__(exelist, version, for_machine, **kwargs) + super().__init__(exelist, version, for_machine, info, **kwargs) self.exe_wrapper = exe_wrapper self.id = 'rustc' self.is_cross = is_cross |
