d: Fix various linking issues on Windows

pull/6090/head
GoaLitiuM 5 years ago
parent 4f83c47880
commit 31d397187d
  1. 11
      mesonbuild/compilers/d.py

@ -394,7 +394,10 @@ class DmdLikeCompilerMixin:
return Compiler.get_soname_args(self, *args, **kwargs) return Compiler.get_soname_args(self, *args, **kwargs)
def get_allow_undefined_link_args(self) -> typing.List[str]: 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): class DCompiler(Compiler):
@ -637,6 +640,9 @@ class GnuDCompiler(DCompiler, GnuCompiler):
return parameter_list 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): class LLVMDCompiler(DmdLikeCompilerMixin, LinkerEnvVarsMixin, BasicLinkerIsCompilerMixin, DCompiler):
@ -667,6 +673,9 @@ class LLVMDCompiler(DmdLikeCompilerMixin, LinkerEnvVarsMixin, BasicLinkerIsCompi
def get_pic_args(self): def get_pic_args(self):
return ['-relocation-model=pic'] return ['-relocation-model=pic']
def get_std_shared_lib_link_args(self):
return ['-shared']
def get_crt_link_args(self, crt_val, buildtype): def get_crt_link_args(self, crt_val, buildtype):
return self.get_crt_args(crt_val, buildtype) return self.get_crt_args(crt_val, buildtype)

Loading…
Cancel
Save