diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-04-15 07:41:12 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-04-15 22:29:49 +0300 |
commit | ef81a013a5fd5f2e962a9c7f37beea0156711dbc (patch) | |
tree | af745308bd09b2f90525056f4bb1fbed0850b14d /mesonbuild | |
parent | 86f725c1e523088c691432c608b3228499ca3c7b (diff) | |
download | meson-ef81a013a5fd5f2e962a9c7f37beea0156711dbc.zip meson-ef81a013a5fd5f2e962a9c7f37beea0156711dbc.tar.gz meson-ef81a013a5fd5f2e962a9c7f37beea0156711dbc.tar.bz2 |
cross: Add compiler cross_args after normal args
This way they override all other arguments. This matches the order of
link arguments too.
Note that this means -I flags will come in afterwards and not override
anything else, but this is correct since that's how toolchain paths
work normally too -- they are searched last.
Closes https://github.com/mesonbuild/meson/issues/3089
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index c941319..41f840d 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1660,9 +1660,9 @@ rule FORTRAN_DEP_HACK if mesonlib.is_windows(): command_template = ' command = {executable} @$out.rsp\n' \ ' rspfile = $out.rsp\n' \ - ' rspfile_content = {cross_args} $ARGS {output_args} {compile_only_args} $in\n' + ' rspfile_content = $ARGS{cross_args} {output_args} {compile_only_args} $in\n' else: - command_template = ' command = {executable} {cross_args} $ARGS {output_args} {compile_only_args} $in\n' + command_template = ' command = {executable} $ARGS {cross_args} {output_args} {compile_only_args} $in\n' command = command_template.format( executable=' '.join([ninja_quote(i) for i in compiler.get_exelist()]), cross_args=' '.join(self.get_cross_info_lang_args(compiler.language, is_cross)), @@ -1721,10 +1721,10 @@ rule FORTRAN_DEP_HACK if mesonlib.is_windows(): command_template = ''' command = {executable} @$out.rsp rspfile = $out.rsp - rspfile_content = {cross_args} $ARGS {dep_args} {output_args} {compile_only_args} $in + rspfile_content = $ARGS {cross_args} {dep_args} {output_args} {compile_only_args} $in ''' else: - command_template = ' command = {executable} {cross_args} $ARGS {dep_args} {output_args} {compile_only_args} $in\n' + command_template = ' command = {executable} $ARGS {cross_args} {dep_args} {output_args} {compile_only_args} $in\n' command = command_template.format( executable=' '.join([ninja_quote(i) for i in compiler.get_exelist()]), cross_args=' '.join(cross_args), @@ -1769,7 +1769,7 @@ rule FORTRAN_DEP_HACK output = '' else: output = ' '.join(compiler.get_output_args('$out')) - command = " command = {executable} {cross_args} $ARGS {dep_args} {output_args} {compile_only_args} $in\n".format( + command = " command = {executable} $ARGS {cross_args} {dep_args} {output_args} {compile_only_args} $in\n".format( executable=' '.join(compiler.get_exelist()), cross_args=' '.join(cross_args), dep_args=' '.join(quoted_depargs), |