diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-08-21 13:22:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-21 13:22:19 +0300 |
commit | 399d65380394556ba5cd1c2a3b364f891d095bfe (patch) | |
tree | 39192e313c0108ef43bef8ae2331ffe8b08dc8ce /mesonbuild/backend/backends.py | |
parent | 5a926172e6e7870574585b5fe742fcf3e48b4398 (diff) | |
parent | 309f7a1b4a7179f44f53b75736b7cd6030f9f40d (diff) | |
download | meson-399d65380394556ba5cd1c2a3b364f891d095bfe.zip meson-399d65380394556ba5cd1c2a3b364f891d095bfe.tar.gz meson-399d65380394556ba5cd1c2a3b364f891d095bfe.tar.bz2 |
Merge pull request #685 from ximion/master
Implement D support
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r-- | mesonbuild/backend/backends.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 1f1c3ca..806a6f3 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -16,6 +16,7 @@ import os, pickle, re from .. import build from .. import dependencies from .. import mesonlib +from .. import compilers import json import subprocess from ..mesonlib import MesonException @@ -233,6 +234,9 @@ class Backend(): def has_swift(self, target): return self.has_source_suffix(target, '.swift') + def has_d(self, target): + return self.has_source_suffix(target, '.d') + def determine_linker(self, target, src): if isinstance(target, build.StaticLibrary): if self.build.static_cross_linker is not None: @@ -358,7 +362,10 @@ class Backend(): if not isinstance(d, build.StaticLibrary) and\ not isinstance(d, build.SharedLibrary): raise RuntimeError('Tried to link with a non-library target "%s".' % d.get_basename()) - args.append(self.get_target_filename_for_linking(d)) + if isinstance(compiler, compilers.LLVMDCompiler): + args.extend(['-L', self.get_target_filename_for_linking(d)]) + else: + args.append(self.get_target_filename_for_linking(d)) # If you have executable e that links to shared lib s1 that links to shared library s2 # you have to specify s2 as well as s1 when linking e even if e does not directly use # s2. Gcc handles this case fine but Clang does not for some reason. Thus we need to |