From ef9aeb188ea2bc7353e59916c18901cde90fa2b3 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 19 Nov 2019 09:30:46 -0800 Subject: Allow selecting the dynamic linker This uses the normal meson mechanisms, an LD environment variable or via cross/native files. Fixes: #6057 --- mesonbuild/compilers/rust.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mesonbuild/compilers/rust.py') diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index a17b697..405afea 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -32,7 +32,7 @@ rust_optimization_args = {'0': [], class RustCompiler(Compiler): - LINKER_PREFIX = '-Wl,' + # rustc doesn't invoke the compiler itself, it doesn't need a LINKER_PREFIX def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs): @@ -109,3 +109,7 @@ class RustCompiler(Compiler): def get_std_exe_link_args(self): return [] + + # Rust does not have a use_linker_args because it dispatches to a gcc-like + # C compiler for dynamic linking, as such we invoke the C compiler's + # use_linker_args method instead. -- cgit v1.1