llvm / llvm/llvm-project

LLVM_RUNTIMES_TARGET gets ignored while building libclc out-of-tree

Open
#191,794 0 comments 0 reactions 0 assignees View on GitHub
build-problem libclc
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

I'm building libclc with the following command:

```sh
CC=$(llvm-config --bindir)/clang cmake libclc/CMakeLists.txt -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_DIR="$(llvm-config --cmakedir)" -DLLVM_RUNTIMES_TARGET=amdgcn-amd-amdhsa-llvm
```

but it ignores the option and builds for all runtimes present in the target llvm build anyways, and prints this warning:

```
CMake Warning:
Manually-specified variables were not used by the project:

LLVM_RUNTIMES_TARGET
```

Contributor guide

Open the contributing guide

Research direction

Start with libclc/CMakeLists.txt and reproduce the out-of-tree Ninja configuration using LLVM_RUNTIMES_TARGET. Trace where the option is expected to be consumed, then verify CMake no longer warns that it is unused and that the build targets only amdgcn-amd-amdhsa-llvm rather than every available runtime.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system, compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.