We use compiler-rt/libunwind/libcxxabi/libcxx in a bare-metal project. Currently we build the runtime libraries as part of building our Docker toolchain environment, but it’s burdensome to update things like build flags as everything gets rebuilt. What’s the best/intended way for projects to directly build and link against the LLVM runtime libraries?
An obvious first attempt is to use ExternalProject_Add, passing in the toolchain file and additional flags as requred.
A solution using add_subdirectory would be ideal, as that better integrates with IDEs and build instrumentation. It also gives us more levers to improve binary size, build times etc.