In the macOS 10.15 SDK the ability to link i386 binaries was removed and
in the corresponding OS it is not possible to run macOS i386 binaries.
The consequence of these changes meant that targets like check-asan
would fail because:
- Unit tests could not be linked for i386
- Lit tests for i386 would fail due to not being able to execute compiled binaries.
The simplest fix to this is to simply disable building for i386 for
macOS when using the 10.15 SDK (or newer). This disables building the
i386 slice for most compiler-rt libraries and consequently disables the
unit and lit tests for macOS i386.
Note that because the DARWIN_osx_ARCHS CMake variable is a cache
variable this patch will have no affect on existing builds unless
the existing cache variable is deleted. The simplest way to deal with
this is delete existing builds and just do a fresh configure.
Note this should not affect the builtins which are managed with
the DARWIN_osx_BUILTIN_ARCHS CMake cache variable.
For those who wish to force using a particular set of architectures when
using newer SDKs passing -DDARWIN_osx_ARCHS=i386;x86_64;x86_64h to
CMake should provide a usable (but completely unsupported) workaround.