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

Sam Clegg via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Apr 11 18:40:48 PDT 2020


sbc100 added a comment.

In D77370#1974792 <https://reviews.llvm.org/D77370#1974792>, @ldionne wrote:

> In D77370#1973982 <https://reviews.llvm.org/D77370#1973982>, @tambre wrote:
>
> > I've tested it out now and `CMAKE_POSITION_INDEPENDENT_CODE=ON` suffices.
> >  Thanks for reviewing and all the info.
> >
> > It seems this same way should work for libc++abi.
> >  Would it make sense to remove `LIBCXXABI_ENABLE_PIC` for consistency?
>
>
> Yes, I think it would make sense.
>
> 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.


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