Bug 1853564 - Look for install_name_tool in addition to install-name-tool and llvm-install-name-tool r=glandium

Differential Revision: https://phabricator.services.mozilla.com/D194086
This commit is contained in:
serge-sans-paille 2024-01-24 06:54:58 +00:00
Родитель 24f9846b7d
Коммит e16dd36de0
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -351,8 +351,13 @@ def llvm_tool(name):
@template
def plain_llvm_or_prefixed(name):
@depends(llvm_tool(f"llvm-{name}"), toolchain_prefix)
def plain_llvm_or_prefixed(name, llvm_name=None):
# look for a tool, using the following alternatives, in that order:
# 1. llvm-${llvm_name}, or llvm-${name} if ${llvm_name} is not provided
# 2. ${toolchain_prefix}${name}
# 3. ${name}
@depends(llvm_tool("llvm-{}".format(llvm_name or name)), toolchain_prefix)
def plain_llvm_or_prefixed(llvm_tool, toolchain_prefix):
commands = [llvm_tool[0], name]
for prefix in toolchain_prefix or ():
@ -776,7 +781,7 @@ check_prog(
check_prog(
"INSTALL_NAME_TOOL",
plain_llvm_or_prefixed("install-name-tool"),
plain_llvm_or_prefixed("install_name_tool", llvm_name="install-name-tool"),
when=compile_environment & target_is_darwin & js_standalone,
paths=clang_search_path,
)