diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-09-05 01:32:10 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-09-05 14:22:56 +0300 |
commit | 2c5688445bfc8a98972d380c17227ec9da0588ae (patch) | |
tree | 4c9d4111e440f0ac2385d0450a9578497ea512ae /ninjabackend.py | |
parent | 70f4e388ca65b3f3381568c345e3bac3eb0551f3 (diff) | |
download | meson-2c5688445bfc8a98972d380c17227ec9da0588ae.zip meson-2c5688445bfc8a98972d380c17227ec9da0588ae.tar.gz meson-2c5688445bfc8a98972d380c17227ec9da0588ae.tar.bz2 |
Created iphone cross file and made it possible to specify compile and link args in the cross file.
Diffstat (limited to 'ninjabackend.py')
-rw-r--r-- | ninjabackend.py | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/ninjabackend.py b/ninjabackend.py index 8e87b13..be4277d 100644 --- a/ninjabackend.py +++ b/ninjabackend.py @@ -815,11 +815,17 @@ class NinjaBackend(backends.Backend): langname == 'rust' or langname == 'cs': continue crstr = '' + cross_args = [] if is_cross: crstr = '_CROSS' + try: + cross_args = self.environment.cross_info.config['properties'][langname + '_link_args'] + except KeyError: + pass rule = 'rule %s%s_LINKER\n' % (langname, crstr) - command = ' command = %s $ARGS %s $in $LINK_ARGS $aliasing\n' % \ + command = ' command = %s %s $ARGS %s $in $LINK_ARGS $aliasing\n' % \ (' '.join(compiler.get_linker_exelist()),\ + ' '.join(cross_args),\ ' '.join(compiler.get_linker_output_args('$out'))) description = ' description = Linking target $out' outfile.write(rule) @@ -940,8 +946,15 @@ rule FORTRAN_DEP_HACK if d != '$out' and d != '$in': d = qstr % d quoted_depargs.append(d) - command = " command = %s $ARGS %s %s %s $in\n" % \ + cross_args = [] + if is_cross: + try: + cross_args = self.environment.cross_info.config['properties'][langname + '_args'] + except KeyError: + pass + command = " command = %s %s $ARGS %s %s %s $in\n" % \ (' '.join(compiler.get_exelist()),\ + ' '.join(cross_args), ' '.join(quoted_depargs),\ ' '.join(compiler.get_output_args('$out')),\ ' '.join(compiler.get_compile_only_args())) @@ -966,6 +979,13 @@ rule FORTRAN_DEP_HACK crstr = '' rule = 'rule %s%s_PCH\n' % (langname, crstr) depargs = compiler.get_dependency_gen_args('$out', '$DEPFILE') + cross_args = [] + if is_cross: + try: + cross_args = self.environment.cross_info.config['properties'][langname + '_args'] + except KeyError: + pass + quoted_depargs = [] for d in depargs: if d != '$out' and d != '$in': @@ -975,8 +995,9 @@ rule FORTRAN_DEP_HACK output = '' else: output = ' '.join(compiler.get_output_args('$out')) - command = " command = %s $ARGS %s %s %s $in\n" % \ + command = " command = %s %s $ARGS %s %s %s $in\n" % \ (' '.join(compiler.get_exelist()),\ + ' '.join(cross_args),\ ' '.join(quoted_depargs),\ output,\ ' '.join(compiler.get_compile_only_args())) |