meson icon indicating copy to clipboard operation
meson copied to clipboard

Add specific dependency handling for clang

Open dcbaker opened this issue 1 year ago • 2 comments

Clang is fun. It has a C API library and C++ API libraries. It has the following configurations that need to be accounted for:

  • libclang (The C API) can be built as either static or shared, it is the only way to get the C API
  • for C++ you can build clang-cpp, which is always built as shared
  • for c++ you can also get individual libs, which can be built as shared or static, but AFAICT the shared individual libs are not a supported configuration (same as LLVM).

On top of that, to get the Clang Version for the C API you need to resort to some trickery. I've checked the implementation I came up with for clang 6-17 and it works for all of those. For the C++ API it's easy, because the header required is a C++ header.

TODO:

  • [x] Needs tests for the C++ API
  • [ ] Needs to have CI skip expectations added

dcbaker avatar Apr 23 '24 22:04 dcbaker

/cc @thesamesam

eli-schwartz avatar Apr 25 '24 03:04 eli-schwartz

Now for the fun of getting the CI green.

dcbaker avatar Jul 12 '24 20:07 dcbaker