Build libclc as part of the build system
Build libclc as part of the build system rather than relying on a checked-in bitcode file. This somewhat increases the duration of the build as clang, opt, etc are built as dependencies.
This is one of the tasks mentioned in #826
Also work around a bug in the libclc cmake by adding some extra LLVM library dependencies.
This contribution is being made by Codeplay on behalf of Samsung.
The failed builds are complaining about a CMake problem.
I can see that most jobs are failing because the library is being built with opaque pointers by default. This can in theory be fixed by passing -DCMAKE_CLC_FLAGS=-Xclang\ -no-opaque-pointers but there's another mistake in the libclc cmake that means it can't parse the extra flags properly.
I can put up a patch to fix this, unless it's not worth it if non-opaque pointer support will be dropped imminently. On that note we might have capacity to help out with the transition to opaque pointers (#816) if there are specific areas/passes that aren't being worked on right now.
Fixes for the two libclc cmake issues: https://reviews.llvm.org/D131266
Thanks for looking into this. I admit that this PR is not the easiest thing for me to integrate into our internal builds. I do think it is the right long term direction compared to keeping a pre-built library checked in, but I need to work through the internal issues before closing on this.
superseeded by #1316