Skip to content

Remove LLVM_CONFIG configuration variable#62

Merged
edsko merged 1 commit into
mainfrom
tcard/LLVM_CONFIG
May 21, 2026
Merged

Remove LLVM_CONFIG configuration variable#62
edsko merged 1 commit into
mainfrom
tcard/LLVM_CONFIG

Conversation

@TravisCardwell

Copy link
Copy Markdown
Collaborator

This commit removes the LLVM_CONFIG configuration variable. Users should configure PATH so that the desired llvm-config is found. The motivation for this change is that we also use the clang executable. It is expected behavior to find clang via PATH or ${LLVM_PATH}/bin, while finding it via LLVM_CONFIG is potentially unexpected.

The logic is simplified. LLVM_PATH is used if set. Otherwise, llvm-config is used if found. There is a configuration error if LLVM_PATH is not set and llvm-config is not found.

If users do not want to use LLVM_PATH, then it should not be set. Note that the KyleMayes/install-llvm-action action sets this environment variable. (We will likely stop using that action in the future so that we can test new versions soon after they are released.)

This commit removes the `LLVM_CONFIG` configuration variable.  Users
should configure `PATH` so that the desired `llvm-config` is found.
The motivation for this change is that we also use the `clang`
executable.  It is expected behavior to find `clang` via `PATH` or
`${LLVM_PATH}/bin`, while finding it via `LLVM_CONFIG` is potentially
unexpected.

The logic is simplified.  `LLVM_PATH` is used if set.  Otherwise,
`llvm-config` is used if found.  There is a configuration error if
`LLVM_PATH` is not set and `llvm-config` is not found.

If users do not want to use `LLVM_PATH`, then it should not be set.
Note that the `KyleMayes/install-llvm-action` action sets this
environment variable.  (We will likely stop using that action in the
future so that we can test new versions soon after they are released.)
@TravisCardwell TravisCardwell self-assigned this May 20, 2026
@edsko

edsko commented May 21, 2026

Copy link
Copy Markdown
Collaborator

@bolt12 Can you verify if LLVM_PATH is usable on nix? Concretely, if all folders you need for llvm (bin, lib, include) are under one parent folder, then you can use LLVM_PATH rather than writing an llvm-config-shim, might simplify that slightly (for your cross compilation example). If not, you'll need to make sure use PATH rather than LLVM_CONFIG to point to your shim (perhaps you already are, I don't remember).

@edsko
edsko added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 1098461 May 21, 2026
10 checks passed
@edsko
edsko deleted the tcard/LLVM_CONFIG branch May 21, 2026 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants