compilers: /LD is not needed for PIC support in DLLs

On Windows, the advantages of PIC are provided by the runtime DLL loader. /LD is
also only valid as an argument to cl.exe, and the linker link.exe just barfs
when it sees it.

The code assumes that the compiler is the same as the linker which caused this
problem to occur.
pull/392/merge
Nirbheek Chauhan 9 years ago committed by Jussi Pakkanen
parent e0fbde786c
commit 3dd039487e
  1. 2
      mesonbuild/compilers.py

@ -1128,7 +1128,7 @@ class VisualStudioCCompiler(CCompiler):
return ['/OUT:' + outputname]
def get_pic_args(self):
return ['/LD']
return [] # PIC is handled by the loader on Windows
def get_std_shared_lib_link_args(self):
return ['/DLL']

Loading…
Cancel
Save