aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoaLitiuM <goalitium@kapsi.fi>2019-10-21 16:24:39 +0300
committerNirbheek Chauhan <nirbheek@centricular.com>2019-11-07 17:31:57 +0530
commite550b5d21d999eaeb5b884c3adea276791e0a4f5 (patch)
treedc0fa7fba2f9252731e5e9bd548fc94c387a91d5
parentb10e3f8b1f596c10c98833efcc4c214fc22092d4 (diff)
downloadmeson-e550b5d21d999eaeb5b884c3adea276791e0a4f5.zip
meson-e550b5d21d999eaeb5b884c3adea276791e0a4f5.tar.gz
meson-e550b5d21d999eaeb5b884c3adea276791e0a4f5.tar.bz2
d: Fix various linking issues on Windows
-rw-r--r--mesonbuild/compilers/d.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py
index 6dd53ad..e33e7ac 100644
--- a/mesonbuild/compilers/d.py
+++ b/mesonbuild/compilers/d.py
@@ -393,7 +393,10 @@ class DmdLikeCompilerMixin:
return Compiler.get_soname_args(self, *args, **kwargs)
def get_allow_undefined_link_args(self) -> typing.List[str]:
- return self.linker.get_allow_undefined_args()
+ args = []
+ for arg in self.linker.get_allow_undefined_args():
+ args.append('-L=' + arg)
+ return args
class DCompiler(Compiler):
@@ -634,6 +637,9 @@ class GnuDCompiler(DCompiler, GnuCompiler):
return parameter_list
+ def get_allow_undefined_link_args(self) -> typing.List[str]:
+ return self.linker.get_allow_undefined_args()
+
class LLVMDCompiler(DmdLikeCompilerMixin, LinkerEnvVarsMixin, BasicLinkerIsCompilerMixin, DCompiler):
def __init__(self, exelist, version, for_machine: MachineChoice, arch, **kwargs):
@@ -662,6 +668,9 @@ class LLVMDCompiler(DmdLikeCompilerMixin, LinkerEnvVarsMixin, BasicLinkerIsCompi
def get_pic_args(self):
return ['-relocation-model=pic']
+ def get_std_shared_lib_link_args(self):
+ return ['-shared']
+
def get_crt_link_args(self, crt_val, buildtype):
return self.get_crt_args(crt_val, buildtype)