diff options
author | GoaLitiuM <goalitium@kapsi.fi> | 2018-09-06 03:57:45 +0300 |
---|---|---|
committer | GoaLitiuM <goalitium@kapsi.fi> | 2018-09-06 03:57:45 +0300 |
commit | 6e160995b0e9b1125abc211e17844752f47b650d (patch) | |
tree | cb3a03eb9852c672cd661b5c990cd7307e4dbed1 /mesonbuild/backend/backends.py | |
parent | 289c1bf91992c167e8ec4292f2584a4add7f5485 (diff) | |
download | meson-6e160995b0e9b1125abc211e17844752f47b650d.zip meson-6e160995b0e9b1125abc211e17844752f47b650d.tar.gz meson-6e160995b0e9b1125abc211e17844752f47b650d.tar.bz2 |
Improve D link argument handling
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index bdc3fad..5232b65 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -591,12 +591,12 @@ class Backend: for d in deps: if not (d.is_linkable_target()): raise RuntimeError('Tried to link with a non-library target "%s".' % d.get_basename()) - d_arg = self.get_target_filename_for_linking(d) - if not d_arg: + arg = self.get_target_filename_for_linking(d) + if not arg: continue - if isinstance(compiler, (compilers.LLVMDCompiler, compilers.DmdDCompiler)): - d_arg = '-L' + d_arg - args.append(d_arg) + if compiler.get_language() == 'd': + arg = '-Wl,' + arg + args.append(arg) return args def get_mingw_extra_paths(self, target): |