Compiling LLVM against muslc using Bazel

I am currently trying to compile LLVM against muslc using bazel. However, this does not seem to configure correctly out of the box. After googling it, I have not found any useful pointers on how to do this.

Does any one know whether it is possible to compile LLVM against muslc using Bazel? And if not Bazel, would it work with CMake?

Do you want to build the LLVM libraries against Musl? Or do you want a LLVM toolchain that builds applications liked with musl?

Both should doable with CMake. I know nothing about Bazel but my guess is that it’s doable if you write the code yourself :slight_smile:

1 Like

I would like to build the LLVM libraries against muscl. The attempts I’ve done so far complained that mallinfo has incomplete type which from what I can see is a consequence of muscl. So far, I have only tried with Bazel since that setup has worked for Linux, Mac and Windows. However, I am happy to try CMake if you reckon that this should work with out of the box?

After googling this some more it seems that the solution might be to add --copt=-U HAVE_MALLINFO which should work with Bazel.