[libc++] Do not share an object library to create the static/shared libraries

Summary:
The problem with using an object library for doing this is that it prevents
the shared library and the static library from being built with the right
default flags. For example, CMake will build shared libraries with -fPIC
by default, but not static libraries. Using an object library to create
the shared library will prevent the right default flags for shared
libraries from being used.

As a side effect, this patch also localizes the logic related to building
a hermetic static library to the static library case, making clear that
this has no effect on the shared library.

Reviewers: phosek, EricWF

Subscribers: mgorny, christof, jkorous, dexonsmith, jdoerfert, libcxx-commits

Differential Revision: https://reviews.llvm.org/D59248

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