summaryrefslogtreecommitdiff
path: root/libcxxabi/cmake
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-06-11 23:59:24 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-06-11 23:59:24 +0000
commit1d7f59eedac1f928329ef707afe0df0c5c5febca (patch)
treea9f7d4b6537a9728f79571d7a9ed4418aec12359 /libcxxabi/cmake
parenta91c5a35db956fa86af728699a60449fe98bb2ee (diff)
build: use POSITION_INDEPENDENT_CODE CMake property
Use the POSITION_INDEPENDENT_CODE target property to indicate that we should be building with -fPIC or the equivalent flag based on the toolchain that we are using. This makes the check more portable and simplifies the flags management. Because we don't want this setting to propagate in the case of an in-tree build, set the property on the targets we construct explicitly rather than setting CMAKE_POSITION_INDEPENDENT_CODE to ON globally.
Diffstat (limited to 'libcxxabi/cmake')
-rw-r--r--libcxxabi/cmake/config-ix.cmake1
1 files changed, 0 insertions, 1 deletions
diff --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake
index 6d1c8700afc..319cdde9c1e 100644
--- a/libcxxabi/cmake/config-ix.cmake
+++ b/libcxxabi/cmake/config-ix.cmake
@@ -50,7 +50,6 @@ endif ()
# Check compiler flags
check_c_compiler_flag(-funwind-tables LIBCXXABI_HAS_FUNWIND_TABLES)
-check_cxx_compiler_flag(-fPIC LIBCXXABI_HAS_FPIC_FLAG)
check_cxx_compiler_flag(-fno-exceptions LIBCXXABI_HAS_NO_EXCEPTIONS_FLAG)
check_cxx_compiler_flag(-fno-rtti LIBCXXABI_HAS_NO_RTTI_FLAG)
check_cxx_compiler_flag(-fstrict-aliasing LIBCXXABI_HAS_FSTRICT_ALIASING_FLAG)