Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libclc] Give a helpful error when an unknown target is requested (ll…
…vm#111528) I just tried using LLVM backend names here e.g. NVPTX but libclc want's targets more like triples. This change adds a mesasge to tell you that. Before you got: ``` libclc target 'AMDGCN' is enabled CMake Error at CMakeLists.txt:253 (list): list index: 1 out of range (-1, 0) CMake Error at CMakeLists.txt:254 (list): list index: 2 out of range (-1, 0) Configuring incomplete, errors occurred! ``` Now you get: ``` CMake Error at CMakeLists.txt:145 (message): Unknown target in LIBCLC_TARGETS_TO_BUILD: "AMDGCN" Valid targets are: amdgcn--;amdgcn--amdhsa;clspv--;clspv64--;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl;amdgcn-mesa-mesa3d ``` Some of the targets are dynamic based on what is installed, so spirv isn't here for me because I don't have llvm-spirv installed yet. So this is not perfect but it's an improvement on the current behaviour.
- Loading branch information