We do something similar, except we add x86_64-apple-darwin
to our LLVM_BUILTIN_TARGETS
and LLVM_RUNTIME_TARGETS
explicitly. Clang has special logic for overriding darwin
triples with the appropriate OS and architecture, and the Apple runtime builds do so. ⚙ D86313 [runtimes] Allow LLVM_BUILTIN_TARGETS to include Darwin has some related discussion.