Commit 023322c9 authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1834964 - Use the same logic for {llvm-,$toolchain-prefix-,}strip as for...

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
parent cf6909d6
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -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,