[libcxx-commits] [libcxx] r355746 - [libc++] Do not force building with -fPIC
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 8 14:24:12 PST 2019
Author: ldionne
Date: Fri Mar 8 14:24:12 2019
New Revision: 355746
URL: http://llvm.org/viewvc/llvm-project?rev=355746&view=rev
Log:
[libc++] Do not force building with -fPIC
Summary:
Whether we build with -fPIC should be specified by the
CMAKE_POSITION_INDEPENDENT_CODE option at configure time.
Note that this patch doesn't change the behavior when building
by default, since -fPIC is used for shared libraries by default.
Reviewers: EricWF
Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits
Differential Revision: https://reviews.llvm.org/D59146
Modified:
libcxx/trunk/lib/CMakeLists.txt
Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=355746&r1=355745&r2=355746&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Fri Mar 8 14:24:12 2019
@@ -105,10 +105,6 @@ if (LIBCXXABI_USE_LLVM_UNWINDER)
endif()
# Setup flags.
-if (NOT WIN32)
- add_flags_if_supported(-fPIC)
-endif()
-
add_link_flags_if_supported(-nodefaultlibs)
if (LIBCXX_TARGETING_MSVC)
More information about the libcxx-commits
mailing list