bazel-contrib / bazel-contrib/toolchains_llvm

Clangd, clang-format, and clang-tidy are required to be in distribution since 1.4.0

Open
#481 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
Starlark
Stars
371
Forks
283
Avg merge
1d 55m
Merged PRs (30d)
25

Description

### Problem

Updating from 1.3.0 to 1.4.0 requires an llvm distribution that contains clangd, clang-format, and clang-tidy

Example error output:

```
ERROR: /home/runner/.cache/bazel/_bazel_runner/05e35152b9f4d639f0caf72c58272633/sandbox/processwrapper-sandbox/1/execroot/_main/_tmp/20b0fbcfb3bd545ee034011c9840c284/_bazel_runner/3a2f3221680ba9580bde03029baa3e75/external/rules_rust++i+rules_rust_tinyjson/BUILD.bazel:4:37: Compiling Rust (without process_wrapper) rlib tinyjson (4 files) [for tool] failed: missing input file '@@toolchains_llvm++llvm+llvm_toolchain//:bin/clang-format'
ERROR: /home/runner/.cache/bazel/_bazel_runner/05e35152b9f4d639f0caf72c58272633/sandbox/processwrapper-sandbox/1/execroot/_main/_tmp/20b0fbcfb3bd545ee034011c9840c284/_bazel_runner/3a2f3221680ba9580bde03029baa3e75/external/rules_rust++i+rules_rust_tinyjson/BUILD.bazel:4:37: Compiling Rust (without process_wrapper) rlib tinyjson (4 files) [for tool] failed: missing input file '@@toolchains_llvm++llvm+llvm_toolchain//:bin/clang-tidy'
ERROR: /home/runner/.cache/bazel/_bazel_runner/05e35152b9f4d639f0caf72c58272633/sandbox/processwrapper-sandbox/1/execroot/_main/_tmp/20b0fbcfb3bd545ee034011c9840c284/_bazel_runner/3a2f3221680ba9580bde03029baa3e75/external/rules_rust++i+rules_rust_tinyjson/BUILD.bazel:4:37: Compiling Rust (without process_wrapper) rlib tinyjson (4 files) [for tool] failed: missing input file '@@toolchains_llvm++llvm+llvm_toolchain//:bin/clangd'
ERROR: /home/runner/.cache/bazel/_bazel_runner/05e35152b9f4d639f0caf72c58272633/sandbox/processwrapper-sandbox/1/execroot/_main/_tmp/20b0fbcfb3bd545ee034011c9840c284/_bazel_runner/3a2f3221680ba9580bde03029baa3e75/external/rules_rust++i+rules_rust_tinyjson/BUILD.bazel:4:37: Compiling Rust (without process_wrapper) rlib tinyjson (4 files) [for tool] failed: 3 input file(s) do not exist
```

### Likely cause

https://github.com/bazel-contrib/toolchains_llvm/pull/463

Prior to this pr, clang-format and clang-tidy were available via `@llvm_toolchain_llvm//:bin/clang-format` and `@llvm_toolchain_llvm//:bin/clang-tidy`, but were not requirements.

### Discussion

If this is what we want, we should update document this and update some common "slimmer" llvm distributions, such as:
- https://steven.casagrande.io/posts/2024/building-macos-llvm-package/
- https://github.com/MaterializeInc/toolchains
- https://github.com/dzbarsky/static-clang

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked toolchains_llvm pull request #463 and the reported Bazel error showing missing clangd, clang-format, and clang-tidy inputs. Compare the documented requirement with the slimmer LLVM distributions linked in the issue; done should include an agreed requirement and corresponding documentation or distribution updates.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.