aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-04-22 14:26:25 +0300
committerGitHub <noreply@github.com>2017-04-22 14:26:25 +0300
commite107017b3bc73d8f04d43d47f2ccb7eecc817aaa (patch)
treebfb41827fd039731d7b1a1dcd1f4478e9825f45c /mesonbuild/backend
parent47579d3acba484d9c801fc9a2e751ffa3194eee5 (diff)
parent61ed2702bf83210d08b4eec9870d081fdedea0fe (diff)
downloadmeson-e107017b3bc73d8f04d43d47f2ccb7eecc817aaa.zip
meson-e107017b3bc73d8f04d43d47f2ccb7eecc817aaa.tar.gz
meson-e107017b3bc73d8f04d43d47f2ccb7eecc817aaa.tar.bz2
Merge pull request #1649 from centricular/static-lto
Fix LTO + static libraries on GCC and Clang
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/ninjabackend.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 3bf840d..db136c7 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1304,7 +1304,11 @@ int dummy;
if static_linker is None:
return
rule = 'rule STATIC%s_LINKER\n' % crstr
- if mesonlib.is_windows():
+ # We don't use @file.rsp on Windows with ArLinker because llvm-ar and
+ # gcc-ar blindly pass the --plugin argument to `ar` and you cannot pass
+ # options as arguments while using the @file.rsp syntax.
+ # See: https://github.com/mesonbuild/meson/issues/1646
+ if mesonlib.is_windows() and not isinstance(static_linker, compilers.ArLinker):
command_template = ''' command = {executable} @$out.rsp
rspfile = $out.rsp
rspfile_content = $LINK_ARGS {output_args} $in