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

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 3 11:20:22 PDT 2019


phosek marked an inline comment as done.
phosek added a subscriber: sbc100.
phosek added inline comments.


================
Comment at: libcxxabi/src/CMakeLists.txt:193
+  if(LIBCXXABI_ENABLE_PIC)
+    set_target_properties(cxxabi_static PROPERTIES POSITION_INDEPENDENT_CODE ON)
+  endif()
----------------
Related to discussion on D60049, should this be set for shared as well or only static? It's unclear to me whether that option should control both or just static? @sbc100 what was your intention?

Personally, I'd prefer to introduce:

```
cmake_dependent_option(LIBCXXABI_ENABLE_PIC_SHARED_LIBRARY "LIBCXXABI_ENABLE_SHARED;LIBCXXABI_ENABLE_PIC" ON)
cmake_dependent_option(LIBCXXABI_ENABLE_PIC_STATIC_LIBRARY "LIBCXXABI_ENABLE_STATIC;LIBCXXABI_ENABLE_PIC" ON)
```

Then use those dependent options to control PIC independently for shared and static libraries. WDYT?


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