Bug 1834964 - Use the same logic for {llvm-,$toolchain-prefix-,}strip as for many other tools. r=firefox-build-system-reviewers,sergesanspaille

Whatever was making things fail with llvm-strip back when using
llvm-strip was made a possibility, doesn't seem to happen anymore, even
with the clang version we were using back then (clang 13).

Differential Revision: https://phabricator.services.mozilla.com/D179040
This commit is contained in:
Mike Hommey 2023-05-29 20:30:40 +00:00
parent cf6909d677
commit 023322c911

View File

@ -867,19 +867,6 @@ def strip_flags(flags, profiling, target):
set_config("STRIP_FLAGS", strip_flags)
@depends(llvm_tool("llvm-strip"), toolchain_prefix, target)
def strip(llvm_strip, toolchain_prefix, target):
commands = ["strip"]
for prefix in toolchain_prefix or ():
commands.insert(0, "%sstrip" % prefix)
# llvm-strip causes some problems on macos targets.
if target.kernel == "Darwin":
commands.append(llvm_strip[0])
else:
commands.insert(0, llvm_strip[0])
return tuple(commands)
def validate_strip(path):
if "llvm-strip" not in path:
return True
@ -895,7 +882,7 @@ def strip_when(compile_env, target, host):
check_prog(
"STRIP",
strip,
plain_llvm_or_prefixed("strip"),
when=strip_when,
paths=clang_search_path,
validate=validate_strip,