Add Darwin x86_64+arm64 universal binary support
This is configured from Make by setting up Darwin+Arm64 as a HOST_CROSS target (which is largely true, as binaries can't be executed on X86_64 machines). On the Soong side, it's a bit blurier, as we don't current have any other users that are the same OS but not natively executable (Linux/musl is executable, Windows/x86 is a different OS). Instead of requiring cc_binary/etc to become multi-architecture-aware and using something like common_first/MultiTarget, this defaults all non-multi-architecture-aware modules to be built with both architectures. It then adds a dependency with the DarwinUniversalVariantTag so that supporting modules can get the outputs of the other variant. Cc uses that dependency tag to run lipo on shared libraries and binaries so that the output of the x86_64 variant is actually a fat binary including both architectures. Bug: 203607969 Test: build sdk-repo targets on a Mac Change-Id: Icbddb0a177c0ba19d3e0d11f8cf568e0d1ea3245
Loading
Please register or sign in to comment