linkers: Move import_library_args to from VS compiler to linker

This is the argument to name the implib when using the Visual Studio
Linker. This is needed by LDC and DMD when using link.exe or
lld-link.exe on windows, and is really a linker argument not a compiler
argument.
pull/6356/head
Dylan Baker 5 years ago
parent c9ecfc84ff
commit 06bbf6cf93
  1. 4
      mesonbuild/compilers/mixins/visualstudio.py
  2. 4
      mesonbuild/linkers.py

@ -205,10 +205,6 @@ class VisualStudioLikeCompiler(metaclass=abc.ABCMeta):
objname = os.path.splitext(pchname)[0] + '.obj'
return objname, ['/Yc' + header, '/Fp' + pchname, '/Fo' + objname]
def gen_import_library_args(self, implibname: str) -> T.List[str]:
"The name of the outputted import library"
return ['/IMPLIB:' + implibname]
def openmp_flags(self) -> T.List[str]:
return ['/openmp']

@ -872,6 +872,10 @@ class VisualStudioLikeLinkerMixin:
is_shared_module: bool) -> T.List[str]:
return []
def import_library_args(self, implibname: str) -> T.List[str]:
"""The command to generate the import library."""
return self._apply_prefix(['/IMPLIB:' + implibname])
class MSVCDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker):

Loading…
Cancel
Save