aboutsummaryrefslogtreecommitdiff
path: root/ninjabackend.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-07-18 23:18:26 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-07-18 23:18:26 +0300
commitf7d58d7b6f433f71d6832fb0fa318dd91971f5fd (patch)
treef854df542554bd1c0891fa92da94797043822a1b /ninjabackend.py
parentd57b3d79bd5798bce8aba4e877b14916f40817c7 (diff)
downloadmeson-f7d58d7b6f433f71d6832fb0fa318dd91971f5fd.zip
meson-f7d58d7b6f433f71d6832fb0fa318dd91971f5fd.tar.gz
meson-f7d58d7b6f433f71d6832fb0fa318dd91971f5fd.tar.bz2
Some fixes.
Diffstat (limited to 'ninjabackend.py')
-rw-r--r--ninjabackend.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ninjabackend.py b/ninjabackend.py
index a58f6c3..21dfd351 100644
--- a/ninjabackend.py
+++ b/ninjabackend.py
@@ -438,11 +438,16 @@ class NinjaBackend(backends.Backend):
subdir = target.get_subdir()
outname_rel = os.path.join(subdir, fname)
src_list = target.get_sources()
- class_list = []
compiler = self.get_compiler_for_source(src_list[0])
assert(compiler.get_language() == 'cs')
rel_srcs = [os.path.join(self.build_to_src, s) for s in src_list]
commands = []
+ if isinstance(target, build.Executable):
+ commands.append('-target:exe')
+ elif isinstance(target, build.SharedLibrary):
+ commands.append('-target:library')
+ else:
+ raise MesonException('Unknown C# target type.')
commands += compiler.get_output_args(outname_rel)
elem = NinjaBuildElement(outname_rel, 'cs_COMPILER', rel_srcs)
elem.add_item('ARGS', commands)