Skip to content

Commit

Permalink
compilers: De-dup -Wl,-rpath, and -Wl,-rpath-link,
Browse files Browse the repository at this point in the history
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 #13819
  • Loading branch information
nirbheek committed Nov 26, 2024
1 parent a3d0bd6 commit e3f37cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesonbuild/compilers/mixins/clike.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit e3f37cc

Please sign in to comment.