diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-03-06 10:18:22 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-03-06 12:11:26 -0800 |
commit | ef1c6cdd543a44b6cfd1e86175ce64f2d742c415 (patch) | |
tree | 784dc71ac777b048ee7e6d89af3d67cfb1649c8f /mesonbuild/compilers | |
parent | 2cdc6892f4cb28d82e878c570e2f39361aee7cad (diff) | |
download | meson-ef1c6cdd543a44b6cfd1e86175ce64f2d742c415.zip meson-ef1c6cdd543a44b6cfd1e86175ce64f2d742c415.tar.gz meson-ef1c6cdd543a44b6cfd1e86175ce64f2d742c415.tar.bz2 |
compilers: Don't deduplicate -L= arguments
This breaks LDC and DMD, so just don't do it.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 1c0adff..436b09d 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -525,6 +525,15 @@ class CompilerArgs(collections.abc.MutableSequence): # both of which are invalid. if arg in cls.dedup2_prefixes: return 0 + if arg.startswith('-L='): + # DMD and LDC proxy all linker arguments using -L=; in conjunction + # with ld64 on macOS this can lead to command line arguments such + # as: `-L=-compatibility_version -L=0 -L=current_version -L=0`. + # These cannot be combined, ld64 insists they must be passed with + # spaces and quoting does not work. if we deduplicate these then + # one of the -L=0 arguments will be removed and the version + # argument will consume the next argument instead. + return 0 if arg in cls.dedup2_args or \ arg.startswith(cls.dedup2_prefixes) or \ arg.endswith(cls.dedup2_suffixes): |