diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-03-01 16:39:50 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2022-03-01 18:34:58 -0800 |
commit | 530338782cce2f3380011c5f3e34050edf4e9243 (patch) | |
tree | 0302ca14240461d670ee286d1f6e1f5435a91f19 /mesonbuild/compilers/d.py | |
parent | 18147b91ff33d0ec03bfb04205d54316070c3fc8 (diff) | |
download | meson-530338782cce2f3380011c5f3e34050edf4e9243.zip meson-530338782cce2f3380011c5f3e34050edf4e9243.tar.gz meson-530338782cce2f3380011c5f3e34050edf4e9243.tar.bz2 |
compilers/d: fix mangling of rpath-link in DMD-like compilers
We didn't consider that it has arguments following it, so the resulting
compiler command line ended up with stuff like:
-L=-rpath-link -L=-L=/path/to/directory -L=more-args
and the directory for rpath-link got eaten up as a regular -L path to
the compiler rather than being passed as -Xlinker to the linker.
Then the -rpath-link would consume the next -Xlinker argument, end up
with the wrong rpath-link (may or may not cause link errors) and then
disappear arguments we need.
As an example failure mode, if the next argument is -soname this treats
the soname text as an input file, which probably does not exist if it
was generated in a subdirectory, and also because it can never be
successfully built in the first place -- though if it did, it would link
to itself which is very wrong.
Diffstat (limited to 'mesonbuild/compilers/d.py')
-rw-r--r-- | mesonbuild/compilers/d.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py index d94df4b..4e24e4e 100644 --- a/mesonbuild/compilers/d.py +++ b/mesonbuild/compilers/d.py @@ -286,7 +286,7 @@ class DmdLikeCompilerMixin(CompilerMixinBase): # see the comment in the "-L" section link_expect_arg = False link_flags_with_arg = [ - '-rpath', '-soname', '-compatibility_version', '-current_version', + '-rpath', '-rpath-link', '-soname', '-compatibility_version', '-current_version', ] for arg in args: # Translate OS specific arguments first. |