GH-136895: Fixes for pulling LLVM as a release artifact (#141002)

This commit is contained in:
Savannah Ostrowski
2025-11-06 11:58:01 -08:00
committed by GitHub
parent 9bf5100037
commit 42d0140860
2 changed files with 25 additions and 17 deletions

View File

@@ -83,6 +83,11 @@ async def _find_tool(tool: str, llvm_version: str, *, echo: bool = False) -> str
# PCbuild externals:
externals = os.environ.get("EXTERNALS_DIR", _targets.EXTERNALS)
path = os.path.join(externals, _EXTERNALS_LLVM_TAG, "bin", tool)
# On Windows, executables need .exe extension
if os.name == "nt" and not path.endswith(".exe"):
path_with_exe = path + ".exe"
if os.path.exists(path_with_exe):
path = path_with_exe
if await _check_tool_version(path, llvm_version, echo=echo):
return path
# Homebrew-installed executables: