summaryrefslogtreecommitdiff
path: root/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
commitc03d53cadbd4f7629bc5ad83035018252b8b9b7b (patch)
tree0518a532f71b9797d7e277b4b18226b3f9196dfe /cmake
parentc5d1c1e3501c9fd0a4d5b5aa6c3dcf8b178fc1b8 (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. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@305174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config-ix.cmake1
1 files changed, 0 insertions, 1 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 6d1c870..319cdde 100644
--- a/cmake/config-ix.cmake
+++ b/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)