fix regression in handling output overwriting for ar-like linkers

Linkers that aren't actually ar, were refactored into a base class in
commit 253ff71e6b, which however didn't
take into account that we were doing checks for this.
pull/11907/head
Eli Schwartz 2 years ago
parent 3c5d46267f
commit 6fad02db04
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 4
      mesonbuild/backend/ninjabackend.py
  2. 2
      mesonbuild/linkers/__init__.py

@ -37,7 +37,7 @@ from .. import mlog
from .. import compilers
from ..arglist import CompilerArgs
from ..compilers import Compiler
from ..linkers import ArLinker, RSPFileSyntax
from ..linkers import ArLikeLinker, RSPFileSyntax
from ..mesonlib import (
File, LibType, MachineChoice, MesonException, OrderedSet, PerMachine,
ProgressBar, quote_arg
@ -2272,7 +2272,7 @@ class NinjaBackend(backends.Backend):
# them out to fix this properly on Windows. See:
# https://github.com/mesonbuild/meson/issues/1517
# https://github.com/mesonbuild/meson/issues/1526
if isinstance(static_linker, ArLinker) and not mesonlib.is_windows():
if isinstance(static_linker, ArLikeLinker) and not mesonlib.is_windows():
# `ar` has no options to overwrite archives. It always appends,
# which is never what we want. Delete an existing library first if
# it exists. https://github.com/mesonbuild/meson/issues/1355

@ -25,6 +25,7 @@ from .linkers import (
VisualStudioLinker,
IntelVisualStudioLinker,
AppleArLinker,
ArLikeLinker,
ArLinker,
ArmarLinker,
DLinker,
@ -92,6 +93,7 @@ __all__ = [
'VisualStudioLikeLinker',
'VisualStudioLinker',
'IntelVisualStudioLinker',
'ArLikeLinker',
'ArLinker',
'ArmarLinker',
'DLinker',

Loading…
Cancel
Save