-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
DevProd Build
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Context
Follow-up from review of SERVER-135723 PR.
The server now pins clang versions separately per toolchain:
- Native macOS: _LLVM_VERSION = "19.1.7" in bazel/toolchains/cc/mongo_apple/mongo_apple_toolchain.bzl
- Linux: the v5 toolchain archives in bazel/toolchains/cc/mongo_linux/mongo_toolchain_version_v5.bzl. The version there is defined by the toolchain builder, not the server, and may not exactly match what we use.
- macOS cross: _LLVM_VERSION = "22" (LLVM 22.1.1) in bazel/toolchains/cc/mongo_apple_cross/mongo_apple_cross_toolchain.bzl
- Windows cross: MONGO_WINDOWS_CROSS_LLVM_VERSION / detection in bazel/toolchains/cc/mongo_windows_cross/mongo_windows_cross_toolchain.bzl
Right now macOS native and Linux both use 19.1.7, but nothing keeps them in sync.
Proposal
As we standardize on clang for all builds:
- Add one global clang version constant in the server repo (e.g. a .bzl under bazel/toolchains/cc/) that each toolchain rule references.
- In each toolchain repository rule, run clang --version on the resolved toolchain (downloaded or LLVM_PATH override) and fail or warn if it doesn't match the global version.
- Decide how intentionally different toolchains (e.g. macOS cross on LLVM 22) should be handled: move them to the global version, or record an explicit per-toolchain exception.
- is related to
-
SERVER-135723 Homebrew bottles unavailable for macOS 14 arm64 dev image when installing LLVM
-
- Closed
-
- related to
-
SERVER-135723 Homebrew bottles unavailable for macOS 14 arm64 dev image when installing LLVM
-
- Closed
-