Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-97634

Add support for linking mongo tidy checks against an LLVM version independently of the current toolchain

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability

      The mongo tidy checks are currently compiled against the LLVM version that happens to be used in the toolchain. It is not necessary that the checks agree with the compiler version to function; disagreement in the LLVM version may mean that the checks are more or less sophisticated than the compiler, but they will still operate. Forcing the checks to use the LLVM version that the compiler is on imposes difficulties when upgrading the compilers because the LLVM API is allowed to change from version to version in backwards- and forwards-incompatible ways. We should be able to bump the compiler version without necessitating sweeping refactoring among the mongo tidy checks to accommodate any API changes.

      One way we could solve this is by vendoring the LLVM API as a third-party library under src/third_party and having the tidy checks compile against that vendored API. That way, upgrading the LLVM API and the tidy checks can be done completely independently of the toolchain or any other dependency.

      An acceptable fallback solution to that more comprehensive one would be to adapt the SConscript/BUILD.bazel files that build the mongo tidy checks to support referencing a configurable toolchain, rather than always the current one. That way, when the toolchain upgrades, the tidy checks can be held back on the previous toolchain until it's convenient to upgrade them.

            Assignee:
            ryan.berryhill@mongodb.com Ryan Berryhill
            Reporter:
            james.bronsted@mongodb.com James Bronsted
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: