diff options
author | GoaLitiuM <goalitium@kapsi.fi> | 2019-04-03 17:14:35 +0300 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-04-17 02:03:56 +0530 |
commit | 42add27ee6e17133f4b48446ce35adc1845340b0 (patch) | |
tree | ff0b6886e974c04a48adefafc81faa2245d64d68 | |
parent | 2962c37dcd96f00a723c412f18b14b463477f721 (diff) | |
download | meson-42add27ee6e17133f4b48446ce35adc1845340b0.zip meson-42add27ee6e17133f4b48446ce35adc1845340b0.tar.gz meson-42add27ee6e17133f4b48446ce35adc1845340b0.tar.bz2 |
d: Fix linker errors with shared libraries
-rw-r--r-- | mesonbuild/compilers/d.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py index f1580b6..529919b 100644 --- a/mesonbuild/compilers/d.py +++ b/mesonbuild/compilers/d.py @@ -622,7 +622,15 @@ class DmdDCompiler(DCompiler): return [] def get_std_shared_lib_link_args(self): - return ['-shared', '-defaultlib=libphobos2.so'] + libname = 'libphobos2.so' + if is_windows(): + if self.arch == 'x86_64': + libname = 'phobos64.lib' + elif self.arch == 'x86_mscoff': + libname = 'phobos32mscoff.lib' + else: + libname = 'phobos.lib' + return ['-shared', '-defaultlib=' + libname] def get_target_arch_args(self): # DMD32 and DMD64 on 64-bit Windows defaults to 32-bit (OMF). |