summaryrefslogtreecommitdiffstats
path: root/libcxx/lib
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-03-08 23:27:46 +0000
committerEric Fiselier <eric@efcs.ca>2019-03-08 23:27:46 +0000
commit9dd9495a35e97b4bc5630879b1961871cbfc3ebd (patch)
treeffdf095e103d3c3648259c301c12e676148bc28c /libcxx/lib
parent0e1586c4fb108a13478a8d7e3610bb211600562c (diff)
downloadbcm5719-llvm-9dd9495a35e97b4bc5630879b1961871cbfc3ebd.tar.gz
bcm5719-llvm-9dd9495a35e97b4bc5630879b1961871cbfc3ebd.zip
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. llvm-svn: 355756
Diffstat (limited to 'libcxx/lib')
-rw-r--r--libcxx/lib/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/lib/CMakeLists.txt b/libcxx/lib/CMakeLists.txt
index 1b10bc68ca0..22a9bf381c8 100644
--- a/libcxx/lib/CMakeLists.txt
+++ b/libcxx/lib/CMakeLists.txt
@@ -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)
OpenPOWER on IntegriCloud