[libc++abi] Add LIBCXXABI_ENABLE_PIC cmake option
authorSam Clegg <sbc@chromium.org>
Wed, 3 Apr 2019 00:34:12 +0000 (00:34 +0000)
committerSam Clegg <sbc@chromium.org>
Wed, 3 Apr 2019 00:34:12 +0000 (00:34 +0000)
commit31d7394dc7c759b501efd5ca2a70f2e1e286f127
tree0e78d34d4b5a97e7d84c0b88f0366ed94e4c248d
parent1e6c93184406d35c06bdc4db8319b8c9c5f2dbba
[libc++abi] Add LIBCXXABI_ENABLE_PIC cmake option

This is on by default, since on many platforms and configurations
libc++abi.a gets statically linked into shared libraries and/or
PIE executables.

This change is a followup to https://reviews.llvm.org/D60005 which
allows us to default to PIC code, but disable this if needed (for
example on WebAssembly where PIC code its currently compatible with
static linking).

Differential Revision: https://reviews.llvm.org/D60049

llvm-svn: 357551
libcxxabi/CMakeLists.txt
libcxxabi/src/CMakeLists.txt