From 31d397187d30c59258a5fdb40634783f7c2c4b5a Mon Sep 17 00:00:00 2001 From: GoaLitiuM Date: Mon, 21 Oct 2019 16:24:39 +0300 Subject: [PATCH] d: Fix various linking issues on Windows --- mesonbuild/compilers/d.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py index e8355a882..a22e8d4ec 100644 --- a/mesonbuild/compilers/d.py +++ b/mesonbuild/compilers/d.py @@ -394,7 +394,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): @@ -637,6 +640,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): @@ -667,6 +673,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)