Delete libc++.a and libc++abi.a on macOS.

With the switch to universal binaries in the LLVM prebuilt, these files
are no longer ar archives, but instead are Mach-O binaries that each
contain multiple ar archives. Our release staging infrastructure signs
these archives, but Apple's notarization service rejects these two
files in the archive we upload.

According to this thread[1], Apple's code signing tool stores the
signature in an (AFPS/HFS) extended attribute, and we need to use ditto
to preserve this attribute in a ZIP file, because "zip" discards it.
Switching to ditto might let us distribute these two files, but we
don't really need them, so it's easiest for us to remove them.

I've left them in for Windows and Linux, but maybe we should stop
distributing those too.

[1] https://developer.apple.com/forums/thread/126038

Bug: http://b/200995199
Test: checkbuild.py
Change-Id: Ic217d1c7bc3b24741f9c4d9c1e8209c5e173c5fa
diff --git a/ndk/checkbuild.py b/ndk/checkbuild.py
index f187055..8a57da8 100755
--- a/ndk/checkbuild.py
+++ b/ndk/checkbuild.py
@@ -492,6 +492,14 @@
         # depend on them. See http://b/142327416 for more info.
         shutil.rmtree(install_path / 'lib64/cmake')
 
+        # Remove libc++.a and libc++abi.a on Darwin. Now that these files are
+        # universal binaries, they break notarization. Maybe it is possible to
+        # fix notarization by using ditto to preserve APFS extended attributes.
+        # See https://developer.apple.com/forums/thread/126038.
+        if self.host == Host.Darwin:
+            (install_path / 'lib64/libc++.a').unlink()
+            (install_path / 'lib64/libc++abi.a').unlink()
+
 
 def versioned_so(host: Host, lib: str, version: str) -> str:
     """Returns the formatted versioned library for the given host.