[libcxx-commits] [PATCH] D59248: [libc++] Do not share an object library to create the static/shared libraries

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 12 06:21:16 PDT 2019


ldionne created this revision.
ldionne added a reviewer: phosek.
Herald added subscribers: libcxx-commits, jdoerfert, dexonsmith, jkorous, christof, mgorny.
Herald added a reviewer: EricWF.

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.


Repository:
  rCXX libc++

https://reviews.llvm.org/D59248

Files:
  libcxx/lib/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59248.190243.patch
Type: text/x-patch
Size: 3737 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190312/8feb3b08/attachment.bin>


More information about the libcxx-commits mailing list