[libcxx-commits] [PATCH] D60049: [libc++abi] Add LIBCXXABI_ENABLE_PIC cmake option

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 2 17:21:15 PDT 2019


ldionne accepted this revision.
ldionne added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libcxxabi/src/CMakeLists.txt:183
 
-cxxabi_object_library(cxxabi_shared_objects POSITION_INDEPENDENT_CODE ON)
+cxxabi_object_library(cxxabi_shared_objects)
 set(cxxabi_static_sources $<TARGET_OBJECTS:cxxabi_static_objects>)
----------------
sbc100 wrote:
> ldionne wrote:
> > This doesn't work because it's an object library. Now `libc++abi.dylib` will never be built with `-fPIC`.
> I have another minor fix to this line as a separate change:  https://reviews.llvm.org/D60158.   It does seem seem to work and builds the library code with `fPIC`. 
Hmm yes, indeed my last comment doesn't make sense since you explicitly set `POSITION_INDEPENDENT_CODE ON` on the object library for the shared library. So this will work and my refactoring is not necessary prior to this change. We can land this and then I'll rebase my refactoring on top.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60049





More information about the libcxx-commits mailing list