llvm / llvm/llvm-project

libclc: CMakeCLCCompiler check doesn't work

Open
#209,004 1 comment 1 reaction 0 assignees View on GitHub
build-problem cmake libclc regression:23
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Despite
` clang -print-targets`
```
spirv - SPIR-V Logical
spirv32 - SPIR-V 32-bit
spirv64 - SPIR-V 64-bit
```
libclc can't configure itself after https://github.com/llvm/llvm-project/pull/185243/changes:

```
CMake Error at cmake/modules/CMakeTestCLCCompiler.cmake:29 (message):
The CLC compiler

/usr/bin/cc

is not able to compile a simple OpenCL test program.
```

BTW: When building libclc 22.1.8 there are diagnostics:
```
[5035/5161] Generating clspv64--.bc
/usr/bin/opt: WARNING: failed to create target machine for 'spir64-unknown-unknown': unable to get target for 'spir64-unknown-unknown', see --version and --triple.
[5036/5161] Generating clspv--.bc
/usr/bin/opt: WARNING: failed to create target machine for 'spir-unknown-unknown': unable to get target for 'spir-unknown-unknown', see --version and --triple.
```

Contributor guide

Open the contributing guide

Research direction

Start with cmake/modules/CMakeTestCLCCompiler.cmake and reproduce the configuration failure using the reported clang target list. Then inspect the libclc 22.1.8 diagnostics from opt for spir and spir64. Done means libclc can configure and compile its simple OpenCL test without the reported CLC compiler failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake
Domain
build-system, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.