I'm linking a thread on a related topic: Open Source Toolchain for iOS, tvOS, etc
While experimenting with these flags, I discovered that enabling compiler_rt support is straightforward on iOS but not on tvOS or watchOS. The SDKs for these platforms from Xcode mark a lot of the functions used by compiler_rt "unavailable" - compiler_rt build for watchOS/tvOS · Issue #125309 · llvm/llvm-project · GitHub