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([