[libcxx-commits] [libcxx] r355756 - Revert "[libc++] Do not force building with -fPIC"

Eric Fiselier via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 8 15:27:46 PST 2019


Author: ericwf
Date: Fri Mar  8 15:27:46 2019
New Revision: 355756

URL: http://llvm.org/viewvc/llvm-project?rev=355756&view=rev
Log:
Revert "[libc++] Do not force building with -fPIC"

This reverts commit r355764.

CMake does not turn -fPIC on for us by default. so this patch breaks
standalone builds. The only reason it hasn't broken any bots is because
LLVM turns on and specifies '-fPIC' for us.

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=355756&r1=355755&r2=355756&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Fri Mar  8 15:27:46 2019
@@ -105,6 +105,10 @@ 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