summaryrefslogtreecommitdiffstats
path: root/libcxx/src
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-05-02 17:43:48 +0000
committerLouis Dionne <ldionne@apple.com>2019-05-02 17:43:48 +0000
commit223ed705d0d3c3b07f00202a04447df836c05df8 (patch)
tree958a1b7908697c4d11b2297b5b06061408d3c41b /libcxx/src
parent291a0b89fa3f5929371eb0cf83e01b2573941948 (diff)
downloadbcm5719-llvm-223ed705d0d3c3b07f00202a04447df836c05df8.tar.gz
bcm5719-llvm-223ed705d0d3c3b07f00202a04447df836c05df8.zip
[libc++][CMake] Link against libSystem on Apple platforms
Instead of manually linking against libm/librt/libpthread, we should be linking against libSystem on Apple platforms, and only that. libm and libpthread are symlinks to libSystem anyway. llvm-svn: 359808
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 3c31548c2c4..5d9cc01d165 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -140,6 +140,10 @@ function(cxx_link_system_libraries target)
target_add_compile_flags_if_supported(${target} PRIVATE "/Zl")
target_add_link_flags_if_supported(${target} PRIVATE "/nodefaultlib")
+ if (LIBCXX_HAS_SYSTEM_LIB)
+ target_link_libraries(${target} PUBLIC System)
+ endif()
+
if (LIBCXX_HAS_PTHREAD_LIB)
target_link_libraries(${target} PUBLIC pthread)
endif()
OpenPOWER on IntegriCloud