OpenCL-ICD-Loader icon indicating copy to clipboard operation
OpenCL-ICD-Loader copied to clipboard

Build ICD Loader using Clang on Windows

Open MathiasMagnus opened this issue 3 years ago • 0 comments

This work was born out of grievance of reproducing non-MSVC specific warnings, errors and linker failures on the OpenCL-Layers project on Windows without having to fire up containers or building-installing under WSL. (At a larger scale, using Clang-derivates on Windows such as ComputeCpp often blow up the console with warnings if the device compiler sees the OpenCL headers.)

Beside touching up the source code to fix warnings, two major things were implemented in CI:

  • Extend Windows CI coverage to using clang-cl.exe, the MSVC-like CLI of Clang.
    • This was done while porting CI definition to PowerShell and doing better error checking
    • Improving error checking uncovered a lot of shortcomings of the previous CI definition (lots of errors went unnoticed)
  • Simplify Linux CI definition and accelerate it by using the same build image as the SDK does

Note: Overall I'm fairly unsatisfied how much code getting this range of CI coverage takes. (Linux/Mac/Win, GCC/Clang/MSVC, C99/11/17, with/without lang exts, Debug/Release) CI is doing the very same thing, but with 2-3 lines of difference for every test matrix elem. I'll be thinking about how to achieve the same coverage with a unified script and much less duplication of code. I would like the scripts to be much simpler.

MathiasMagnus avatar May 24 '22 11:05 MathiasMagnus