build: fix standalone builds for compiler-rt on Darwin
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 17 Sep 2018 23:25:36 +0000 (23:25 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 17 Sep 2018 23:25:36 +0000 (23:25 +0000)
commitf5ebd70a67470a743c9ee4a5e8c20649d94ecce2
tree2af243ab56c0373aeb3467045b81581fab16fab3
parent2ee93d28fd39adb9bcf80cb4de3edbfe3f746f69
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.

llvm-svn: 342425
compiler-rt/CMakeLists.txt