cmake/modules/LLVMLibCCompileOptionRules.cmake currently blankets -ffreestanding (for CPU targets) for TUs to avoid creating infinite recursion via things like loop idiom recognition turning the implementation of memcpy into memcpy. I think I'd like to remove -ffreestanding and instead move to building strlen with -fno-builtin-strlen, etc, for all symbols, and remove -ffreestanding. Clang supports a function attribute for this, but gcc does not, so command line flags it is.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96628