diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-08-20 23:14:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-20 23:14:05 +0300 |
commit | 1ea3ddc6ad7458bbcb51704ccb5ef266c5164074 (patch) | |
tree | 62540e1b93a4844a5e5c45395a63bbfa3ec419d3 /mesonbuild/compilers/rust.py | |
parent | 0384487fc52c445d005ca1ea5b2a1c83ce56200c (diff) | |
parent | 142012ab73bf1cfedb59f539400f0c18df055ec8 (diff) | |
download | meson-1ea3ddc6ad7458bbcb51704ccb5ef266c5164074.zip meson-1ea3ddc6ad7458bbcb51704ccb5ef266c5164074.tar.gz meson-1ea3ddc6ad7458bbcb51704ccb5ef266c5164074.tar.bz2 |
Merge pull request #5681 from dcbaker/dynamic-linker-split
split dynamic linker representations from compilers
Diffstat (limited to 'mesonbuild/compilers/rust.py')
-rw-r--r-- | mesonbuild/compilers/rust.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 665b3c2..479c5a7 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -13,11 +13,14 @@ # limitations under the License. import subprocess, os.path +import typing from ..mesonlib import EnvironmentException, MachineChoice, Popen_safe - from .compilers import Compiler, rust_buildtype_args, clike_debug_args +if typing.TYPE_CHECKING: + from ..environment import Environment # noqa: F401 + rust_optimization_args = {'0': [], 'g': ['-C', 'opt-level=0'], '1': ['-C', 'opt-level=1'], @@ -27,9 +30,9 @@ rust_optimization_args = {'0': [], } class RustCompiler(Compiler): - def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrapper=None): + def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, exe_wrapper=None, **kwargs): self.language = 'rust' - super().__init__(exelist, version, for_machine) + super().__init__(exelist, version, for_machine, **kwargs) self.exe_wrapper = exe_wrapper self.id = 'rustc' self.is_cross = is_cross @@ -77,9 +80,6 @@ class RustCompiler(Compiler): def get_buildtype_args(self, buildtype): return rust_buildtype_args[buildtype] - def build_rpath_args(self, build_dir, from_dir, rpath_paths, build_rpath, install_rpath): - return self.build_unix_rpath_args(build_dir, from_dir, rpath_paths, build_rpath, install_rpath) - def get_sysroot(self): cmd = self.exelist + ['--print', 'sysroot'] p, stdo, stde = Popen_safe(cmd) @@ -102,8 +102,5 @@ class RustCompiler(Compiler): return parameter_list - def get_buildtype_linker_args(self, build_type): - return [] - def get_std_exe_link_args(self): return [] |