diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-10-31 23:18:43 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-10-31 23:22:07 -0400 |
commit | 21f86fa90209538b1d9cc9aa3aaa1d8dc884137f (patch) | |
tree | ea4b3ec66e778067b37c51019fbd0c85d50558a7 | |
parent | f9d6ae8d57500b243ed34684b44486a37f3c67fa (diff) | |
download | meson-21f86fa90209538b1d9cc9aa3aaa1d8dc884137f.zip meson-21f86fa90209538b1d9cc9aa3aaa1d8dc884137f.tar.gz meson-21f86fa90209538b1d9cc9aa3aaa1d8dc884137f.tar.bz2 |
Revert "backends/ninja: run `ranlib -c $out` when using the apple ar"
This reverts commit bdc6f243e9f95246b5801d2c0ccf64173fb280f3.
This is part of #10628 and needs to be reverted, as it breaks other
things.
See https://github.com/mesonbuild/meson/pull/10628#issuecomment-1230560772
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index bbaeef3..16c0d37 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -37,7 +37,7 @@ from .. import mlog from .. import compilers from ..arglist import CompilerArgs from ..compilers import Compiler -from ..linkers import ArLinker, AppleArLinker, RSPFileSyntax +from ..linkers import ArLinker, RSPFileSyntax from ..mesonlib import ( File, LibType, MachineChoice, MesonException, OrderedSet, PerMachine, ProgressBar, quote_arg @@ -2139,7 +2139,7 @@ class NinjaBackend(backends.Backend): if static_linker is None: continue rule = 'STATIC_LINKER{}'.format(self.get_rule_suffix(for_machine)) - cmdlist: T.List[T.Union[str, NinjaCommandArg]] = [] + cmdlist = [] args = ['$in'] # FIXME: Must normalize file names with pathlib.Path before writing # them out to fix this properly on Windows. See: @@ -2153,17 +2153,6 @@ class NinjaBackend(backends.Backend): cmdlist += static_linker.get_exelist() cmdlist += ['$LINK_ARGS'] cmdlist += NinjaCommandArg.list(static_linker.get_output_args('$out'), Quoting.none) - # The default ar on MacOS (at least through version 12), does not - # add extern'd variables to the symbol table by default, and - # requires that apple's ranlib be called with a special flag - # instead after linking - if isinstance(static_linker, AppleArLinker): - # This is a bit of a hack, but we assume that that we won't need - # an rspfile on MacOS, otherwise the arguments are passed to - # ranlib, not to ar - cmdlist.extend(args) - args = [] - cmdlist.extend(['&&', 'ranlib', '-c', '$out']) description = 'Linking static target $out' if num_pools > 0: pool = 'pool = link_pool' |