[libcxx-commits] [PATCH] D77370: [libunwind] Add LIBUNWIND_ENABLE_PIC

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 13 07:29:52 PDT 2020


ldionne added a comment.

In D77370#1976441 <https://reviews.llvm.org/D77370#1976441>, @sbc100 wrote:

> In D77370#1974792 <https://reviews.llvm.org/D77370#1974792>, @ldionne wrote:
>
> > However, see the discussion in https://reviews.llvm.org/D60049. I think we should get @phosek and @sbc100 's inputs. Folks, is there a reason why controlling whether libc++abi is built with PIC with `CMAKE_POSITION_INDEPENDENT_CODE` in the cache is not sufficient?
>
>
> The reason this came up for WebAssembly is that our PIC ABI is still under development, almost all current users do static linking and including PIC code in static builds is currently undesirable.   In fact `-fPIC` not currently supported at all with the default wasm target.
>
> So as long as there is some way to build static libraries that don't include PIC code we (WebAssembly) will be happy.   If non-PIC static libraries are the default (like they are in cmake) all the better for us.


Ok, so IIUC we could just remove the `LIBCXXABI_ENABLE_PIC` setting and that would still work for you? Static libraries would still be built without PIC (as is default in CMake), and if you wanted to make that more explicit (which I would suggest), you could even use `CMAKE_POSITION_INDEPENDENT_CODE=OFF`.

In light of this, would you (or someone else) be opposed to removing `LIBCXXABI_ENABLE_PIC`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77370





More information about the libcxx-commits mailing list