build: fix standalone builds for compiler-rt on Darwin

When building static fat libraries, we need to ensure that we use libtool rather
than llvm-ar to create the library.  Duplicate the rules from LLVM to ensure
that we correctly build the fat libraries when building compiler-rt standalone.
This also requires that we duplicate the workaround for the `DYLD_LIBRARY_PATH`
for SIP.  Additionally, ensure that we set the `CMAKE_*_ARCHIVE_FINISH` variable
to ensure that we do not try to use `ranlib` on that target.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@342425 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed