From 333ef4cec8873910d77a1f09ef425484232644ef Mon Sep 17 00:00:00 2001 From: Steven Casagrande Date: Thu, 17 Apr 2025 18:12:06 -0400 Subject: [PATCH] Probe each toolchain bin for existence --- toolchain/internal/configure.bzl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/toolchain/internal/configure.bzl b/toolchain/internal/configure.bzl index 1f02e9ff..1ea48a67 100644 --- a/toolchain/internal/configure.bzl +++ b/toolchain/internal/configure.bzl @@ -121,7 +121,12 @@ def llvm_config_impl(rctx): # symlinked path from the wrapper. wrapper_bin_prefix = "bin/" tools_path_prefix = "bin/" - tools = _toolchain_tools(os) + # Probe each binary for existence + tools = {} + for tool in _toolchain_tools(os).items(): + if rctx.path(llvm_dist_rel_path + "bin/" + tool[0]).exists: + tools.update([tool]) + for tool_name, symlink_name in tools.items(): rctx.symlink(llvm_dist_rel_path + "bin/" + tool_name, tools_path_prefix + symlink_name) symlinked_tools_str = "".join([