diff options
author | GoaLitiuM <goalitium@kapsi.fi> | 2018-08-18 14:10:58 +0300 |
---|---|---|
committer | GoaLitiuM <goalitium@kapsi.fi> | 2018-08-20 22:27:31 +0300 |
commit | 4a1d64cb6cb8c75cf98b6d5bc36c9634abc26f19 (patch) | |
tree | 996436bd8326f900530b8a9c2da27bf799762000 | |
parent | 7ab938d9aff64bfa9936daebbbb6b06d1b054ff1 (diff) | |
download | meson-4a1d64cb6cb8c75cf98b6d5bc36c9634abc26f19.zip meson-4a1d64cb6cb8c75cf98b6d5bc36c9634abc26f19.tar.gz meson-4a1d64cb6cb8c75cf98b6d5bc36c9634abc26f19.tar.bz2 |
Fix import libraries and static library naming
-rw-r--r-- | mesonbuild/build.py | 2 | ||||
-rw-r--r-- | mesonbuild/compilers/d.py | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index c1cb8a8..96c64b8 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1079,7 +1079,7 @@ You probably should put it in link_with instead.''') ''' linker, _ = self.get_clink_dynamic_linker_and_stdlibs() # Mixing many languages with MSVC is not supported yet so ignore stdlibs. - if linker and linker.get_id() == 'msvc': + if linker and linker.get_id() in ['msvc', 'llvm', 'dmd']: return True return False diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py index eafdc2d..3366b6b 100644 --- a/mesonbuild/compilers/d.py +++ b/mesonbuild/compilers/d.py @@ -174,6 +174,9 @@ class DCompiler(Compiler): def get_std_exe_link_args(self): return [] + def gen_import_library_args(self, implibname): + return ['-Wl,--out-implib=' + implibname] + def build_rpath_args(self, build_dir, from_dir, rpath_paths, build_rpath, install_rpath): if is_windows(): return [] @@ -252,6 +255,10 @@ class DCompiler(Compiler): if arg.startswith('-Wl,'): linkargs = arg[arg.index(',') + 1:].split(',') for la in linkargs: + if la.startswith('--out-implib='): + # Import library name for MSVC targets + dcargs.append('-L/IMPLIB:' + la[13:].strip()) + continue dcargs.append('-L' + la.strip()) continue elif arg.startswith('-install-name'): |