diff options
author | Matthieu Gautier <mgautier@kymeria.fr> | 2017-02-06 15:17:17 +0100 |
---|---|---|
committer | Matthieu Gautier <mgautier@kymeria.fr> | 2017-02-06 15:17:17 +0100 |
commit | fab04b1fbe06188cb2df00f66cf7a74d00686f98 (patch) | |
tree | d556302bd1dcc60d441ab7df018d5e28bedf60ac | |
parent | 0b2146c8f794d5642a0a4feb9152916b49fd4be8 (diff) | |
download | meson-fab04b1fbe06188cb2df00f66cf7a74d00686f98.zip meson-fab04b1fbe06188cb2df00f66cf7a74d00686f98.tar.gz meson-fab04b1fbe06188cb2df00f66cf7a74d00686f98.tar.bz2 |
Change the order of link_args when cross_compiling with ninja.
A user may want to add libraries to link with in the (c|cpp)_link_args
property of the cross-compile file.
Those libraries should be at the end of the command line due to reference
resolution mechanism of the compiler.
By moving the cross_args after LINK_ARGS we are sure that specific
cross-compilation libraries are at the end of the command line.
See [github PR #1363](https://github.com/mesonbuild/meson/pull/1363) to
have the context of this change.
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 67a44a3..a22e0ab 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1276,10 +1276,10 @@ int dummy; if mesonlib.is_windows(): command_template = ''' command = {executable} @$out.rsp rspfile = $out.rsp - rspfile_content = {cross_args} $ARGS {output_args} $in $LINK_ARGS $aliasing + rspfile_content = $ARGS {output_args} $in $LINK_ARGS {cross_args} $aliasing ''' else: - command_template = ' command = {executable} {cross_args} $ARGS {output_args} $in $LINK_ARGS $aliasing\n' + command_template = ' command = {executable} $ARGS {output_args} $in $LINK_ARGS {cross_args} $aliasing\n' command = command_template.format( executable=' '.join(compiler.get_linker_exelist()), cross_args=' '.join(cross_args), |