summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2024-11-26 20:36:14 +0530
committerEli Schwartz <eschwartz93@gmail.com>2024-12-27 02:36:48 -0500
commita00467268549bce29e07cb435033b879ece939c3 (patch)
tree007d8ec8e9362cc622a0bc881b46d56ff470971c
parent1f6ce53f773d00ab728bda6ae0634076430ce5de (diff)
downloadmeson-a00467268549bce29e07cb435033b879ece939c3.tar.gz
compilers: De-dup -Wl,-rpath, and -Wl,-rpath-link,
When followed by a comma, we can be absolutely sure that these are argument prefixes, and will not consume the next argument to form a single argument. Fixes spammy warnings on apple clang: `ld: warning: duplicate -rpath 'build/dist/darwin_universal/arm64/lib/pkgconfig/../../lib' ignored` Continuation from https://github.com/mesonbuild/meson/pull/13819
-rw-r--r--mesonbuild/compilers/mixins/clike.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index 032488533..a75cd2a81 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -53,7 +53,7 @@ class CLikeCompilerArgs(arglist.CompilerArgs):
# NOTE: not thorough. A list of potential corner cases can be found in
# https://github.com/mesonbuild/meson/pull/4593#pullrequestreview-182016038
- dedup1_prefixes = ('-l', '-Wl,-l')
+ dedup1_prefixes = ('-l', '-Wl,-l', '-Wl,-rpath,', '-Wl,-rpath-link,')
dedup1_suffixes = ('.lib', '.dll', '.so', '.dylib', '.a')
dedup1_args = ('-c', '-S', '-E', '-pipe', '-pthread', '-Wl,--export-dynamic')