This patch extends clang driver to pass the right flags to the clang frontend, and ld64, so that they can emit macho files with two build version load commands. It adds a new -darwin-target-variant option which complements -target and also can be used to specify different target variants when multi-arch compilations are invoked with multiple -arch commands.
MachO uses two build version load commands to represent an object file / binary that is targeting both the macOS target,
and the Mac Catalyst target. At runtime, a dynamic library that supports both targets can be loaded from either a native
macOS or a Mac Catalyst app on a macOS system. We want to add support to this to upstream to LLVM to be able to build
compiler-rt for both targets, to finish the complete support for the Mac Catalyst platform, which is right now targetable
by upstream clang, but the compiler-rt bits aren't supported because of the lack of this multiple build version support.