runtimeverification / runtimeverification/llvm-backend

Rethink lookup of `clang-$VERSION` in CMake

Open
#808 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
43
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Currently, our chained lookup for LLVM tools looks something like this:

find_program(CMAKE_CXX_COMPILER clang++-16)
find_program(CMAKE_CXX_COMPILER clang++-15)
find_program(CMAKE_CXX_COMPILER clang++-14)
find_program(CMAKE_CXX_COMPILER clang++-13)
find_program(CMAKE_CXX_COMPILER clang++-12)
find_program(CMAKE_CXX_COMPILER clang++-11)
find_program(CMAKE_CXX_COMPILER clang++)

This usually works fine for globally-installed versions of LLVM, but breaks down if I want to point the build system at a local build[^1]. We should more consistently set the desired LLVM version, or use some of the options to find_program if possible.

Not a huge priority, as for this use-case I can just fiddle with the code, but it would be good to fix.

[^1]: For context, this is related to #730 - the changes to pointer semantics are requiring more of a debugging process than we've needed for other version changes.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by searching the CMake configuration for the chained find_program calls that select clang++-16 through clang++. Read the relevant CMake find_program options and reproduce the local LLVM build scenario described in the issue; done means the desired LLVM version can be selected consistently without manually editing the lookup chain.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.