Skip to content

Commit a004672

Browse files
nirbheekeli-schwartz
authored andcommitted
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 mesonbuild#13819
1 parent 1f6ce53 commit a004672

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mesonbuild/compilers/mixins/clike.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CLikeCompilerArgs(arglist.CompilerArgs):
5353

5454
# NOTE: not thorough. A list of potential corner cases can be found in
5555
# https://github.com/mesonbuild/meson/pull/4593#pullrequestreview-182016038
56-
dedup1_prefixes = ('-l', '-Wl,-l')
56+
dedup1_prefixes = ('-l', '-Wl,-l', '-Wl,-rpath,', '-Wl,-rpath-link,')
5757
dedup1_suffixes = ('.lib', '.dll', '.so', '.dylib', '.a')
5858
dedup1_args = ('-c', '-S', '-E', '-pipe', '-pthread', '-Wl,--export-dynamic')
5959

0 commit comments

Comments
 (0)