From d69ca46e9d79bb75601259220d0fb749932d572e Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 15 Oct 2020 16:59:29 -0700 Subject: [PATCH] compilers/rust: warn about setting -C linker in your compiler args --- mesonbuild/environment.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 941acdcb5..6545a006c 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -1651,6 +1651,13 @@ class Environment: # the default use that, and second add the necessary arguments # to rust to use -fuse-ld + if any(a.startswith('linker=') for a in compiler): + mlog.warning( + 'Please do not put -C linker= in your compiler ' + 'command, set rust_ld=command in your cross file ' + 'or use the RUST_LD environment variable. meson ' + 'will override your seletion otherwise.') + if override is None: extra_args = {} always_args = []