Skip to content

LLVM_RUNTIME_TARGETS option #137018

Open
Open
@ye-luo

Description

@ye-luo

LLVM_ prefix makes it sounds like global in the whole LLVM build.
Searching the code base
https://github.com/search?q=repo%3Allvm%2Fllvm-project%20LLVM_RUNTIME_TARGETS&type=code
indicates that is an option per runtime.

If I'm building 3 runtime -DLLVM_ENABLE_RUNTIMES="a;b;c"
however, if a only supports arch1 and arch2, b only support arch3, c supports arch1 and arc3,
I'm not sure how I should use LLVM_RUNTIME_TARGETS option
and what happens if I put -DLLVM_RUNTIME_TARGETS="arch1;arch2;arch3"

#136729 mentioned additional variables to control the resolution

    -DLLVM_RUNTIME_TARGETS='default;amdgcn-amd-amdhsa;nvptx64-nvidia-cuda'     \
    -DRUNTIMES_nvptx64-nvidia-cuda_LLVM_ENABLE_RUNTIMES=openmp \
    -DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES=openmp

I found it cumbersome.

Instead, I'd like to see

    -DLLVM_ENABLE_RUNTIMES=openmp \
    -DRUNTIME_openmp_TARGETS="nvptx64-nvidia-cuda" # to select a subset if added

In short, I prefer the runtime name as the primary key rather than its supported targets in the user facing CMake options.

Metadata

Metadata

Assignees

Labels

cmakeBuild system in general and CMake in particular

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions