aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Klumpp <matthias@tenstral.net>2018-06-25 23:06:06 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-06-30 00:28:39 +0300
commit7618fa81d3eadb9af4b1e66a54f3b21ac6d0721e (patch)
tree4936c11d35dbdda3275b8a3c4fe85bb14a06608c
parent5715284177cbfdea7e1190d5b6652a2d9292ad2a (diff)
downloadmeson-7618fa81d3eadb9af4b1e66a54f3b21ac6d0721e.zip
meson-7618fa81d3eadb9af4b1e66a54f3b21ac6d0721e.tar.gz
meson-7618fa81d3eadb9af4b1e66a54f3b21ac6d0721e.tar.bz2
d: Don't fail if -link-defaultlib is manually added to the LDC link args
-rw-r--r--mesonbuild/compilers/d.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py
index 39e19b2..f0f3d54 100644
--- a/mesonbuild/compilers/d.py
+++ b/mesonbuild/compilers/d.py
@@ -212,6 +212,14 @@ class DCompiler(Compiler):
for la in linkargs:
dcargs.append('-L' + la.strip())
continue
+ elif arg.startswith('-link-defaultlib') or arg.startswith('-linker'):
+ # these are special arguments to the LDC linker call,
+ # arguments like "-link-defaultlib-shared" do *not*
+ # denote a library to be linked, but change the default
+ # Phobos/DRuntime linking behavior, while "-linker" sets the
+ # default linker.
+ dcargs.append(arg)
+ continue
elif arg.startswith('-l'):
# translate library link flag
dcargs.append('-L' + arg)