Can set per-target cs args.

pull/15/head
Jussi Pakkanen 11 years ago
parent 544ce42c52
commit f55c81ec23
  1. 4
      build.py
  2. 2
      ninjabackend.py

@ -251,6 +251,10 @@ class BuildTarget():
if not isinstance(cpplist, list):
cpplist = [cpplist]
self.add_compiler_args('cpp', cpplist)
cslist = kwargs.get('cs_args', [])
if not isinstance(cslist, list):
cslist = [cslist]
self.add_compiler_args('cs', cslist)
self.link_args = kwargs.get('link_args', [])
if not isinstance(self.link_args, list):
self.link_args = [self.link_args]

@ -442,7 +442,7 @@ class NinjaBackend(backends.Backend):
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 = []
commands = target.extra_args.get('cs', [])
commands += compiler.get_buildtype_args(buildtype)
if isinstance(target, build.Executable):
commands.append('-target:exe')

Loading…
Cancel
Save