[libcxx-commits] [PATCH] D60173: [libc++abi] 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
Wed Apr 3 13:47:17 PDT 2019


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

Thanks for the refactoring!



================
Comment at: libcxxabi/src/CMakeLists.txt:195
+                          POSITION_INDEPENDENT_CODE
+                            ${LIBCXXABI_ENABLE_PIC})
+
----------------
phosek wrote:
> ldionne wrote:
> > You need to do
> > 
> > ```
> > if (LIBCXXABI_ENABLE_PIC)
> >   target_set_properties(... ON)
> > endif()
> > ```
> > 
> > Otherwise, you're overwriting the default that's being set through `CMAKE_POSITION_INDEPENDENT_CODE`.
> @sbc100 mentioned in the other comment that some users may want to have a flexibility to also disable `-fPIC` even for the shared case where this won't be sufficient, but I'm fine to punt on that until it's needed.
I'm that user. I use `CMAKE_POSITION_INDEPENDENT_CODE=OFF` and I don't touch those stinking fine-grained controls.


Repository:
  rCXXA libc++abi

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60173/new/

https://reviews.llvm.org/D60173





More information about the libcxx-commits mailing list