aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/rust.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-10-15 16:59:02 -0700
committerDylan Baker <dylan@pnwbakers.com>2020-11-13 09:00:35 -0800
commit5afd608a755ebedd6b532dd82abefff205b9e997 (patch)
treeb0730df976a38e86c92f52534c86e9bc74c1536a /mesonbuild/compilers/rust.py
parent5c74cccbb906ab92a75ae31262634a3e8b3f9dfa (diff)
downloadmeson-5afd608a755ebedd6b532dd82abefff205b9e997.zip
meson-5afd608a755ebedd6b532dd82abefff205b9e997.tar.gz
meson-5afd608a755ebedd6b532dd82abefff205b9e997.tar.bz2
compilers/rust: add and use an implementation of use_linker_args
Diffstat (limited to 'mesonbuild/compilers/rust.py')
-rw-r--r--mesonbuild/compilers/rust.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py
index 1be0cd8..312b3b6 100644
--- a/mesonbuild/compilers/rust.py
+++ b/mesonbuild/compilers/rust.py
@@ -125,6 +125,10 @@ class RustCompiler(Compiler):
def get_output_args(self, outputname: str) -> T.List[str]:
return ['-o', outputname]
+ @classmethod
+ def use_linker_args(cls, linker: str) -> T.List[str]:
+ return ['-C', 'linker={}'.format(linker)]
+
# 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.