This is a change that will be necessary for master-next. readobj seems
to report elf32-littlearm when compiling for Android ARMv7.
This is similar to commit f7cf5bde46 which
is still available in master-next, but I think was (mistakenly) reverted
with #32265.
head -c, to print the specified number of bytes, is a GNU extension.
Using dd for the same task should be somewhat more portable.
Mac OS X does not have status=none, so redirect the status output away
instead. Despite appearances, redirecting with the Bourne shell-ism
`2>/dev/null` is fine on Windows since Windows executes with the
internal lit shell runner, which translates `/dev/null` to a temporary
file.
`file` is not available on windows except through GnuWin32, and that
`file` was identifying the ClangModule as an ACB Archive file instead of
a COFF file.
Instead of using `file`, it is easier and more portable to use
llvm-readobj. I also converted the egrep usage into FileCheck while
adding COFF support.
1. Require objc_interop (the Linux bot currently fails to import
Objective-C modules.
2. Generalize the testcase to also accept ELF containers so it works when
(1) is resolved.
Swift SVN r28630