diff options
author | Fini Jastrow <ulf.fini.jastrow@desy.de> | 2023-11-09 20:18:19 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2023-11-22 22:11:50 +0200 |
commit | 30ab9747ae03364ac2ccd4a8f508286c57ed54a5 (patch) | |
tree | 476ab17bb358afe7dd46df1a228844bc624e8e04 /mesonbuild/compilers | |
parent | 4a1e0235cc81442c312cb31a9ed5c639f0b1c8c5 (diff) | |
download | meson-30ab9747ae03364ac2ccd4a8f508286c57ed54a5.zip meson-30ab9747ae03364ac2ccd4a8f508286c57ed54a5.tar.gz meson-30ab9747ae03364ac2ccd4a8f508286c57ed54a5.tar.bz2 |
clike: Deduplicate rpath linker flags
[why]
On Apple clang 15.0.0 linker (i.e. ld64 1015.7) giving the same rpath
multiple times raises a warning:
ld: warning: duplicate -rpath '/local/lib' ignored
This can frequently happen when linking several dependencies that all
have that rpath in e.g. pkgconfig.
[how]
Deduplicate all rpath arguments.
[note]
I'm not sure how the code handles --start/end-group, but for rpath that
should not make any difference as that is not bound to a group.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index ca90999..ad8fa27 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -1,4 +1,4 @@ -# Copyright 2012-2022 The Meson development team +# Copyright 2012-2023 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -64,7 +64,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', '-Wl,--export-dynamic') + dedup1_prefixes = ('-l', '-Wl,-l', '-Wl,--export-dynamic', '-Wl,-rpath') dedup1_suffixes = ('.lib', '.dll', '.so', '.dylib', '.a') dedup1_args = ('-c', '-S', '-E', '-pipe', '-pthread') |