diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-05-04 14:41:33 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-05-19 23:28:17 +0300 |
commit | b1b8e777a226a347785a162161d1c68e041dc5c9 (patch) | |
tree | a7139bf07745245a9c3acca735f7832e465882e8 /mesonbuild/compilers/rust.py | |
parent | 189545c2a82621641d1c239c4066c132d2035f1a (diff) | |
download | meson-b1b8e777a226a347785a162161d1c68e041dc5c9.zip meson-b1b8e777a226a347785a162161d1c68e041dc5c9.tar.gz meson-b1b8e777a226a347785a162161d1c68e041dc5c9.tar.bz2 |
rust: override get_linker_always_args
instead of opencoding what should be there in the rust compile rule
Diffstat (limited to 'mesonbuild/compilers/rust.py')
-rw-r--r-- | mesonbuild/compilers/rust.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 285d490..6a7bd04 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -162,3 +162,9 @@ class RustCompiler(Compiler): if colortype in {'always', 'never', 'auto'}: return [f'--color={colortype}'] raise MesonException(f'Invalid color type for rust {colortype}') + + def get_linker_always_args(self) -> T.List[str]: + args: T.List[str] = [] + for a in super().get_linker_always_args(): + args.extend(['-C', f'link-arg={a}']) + return args |