summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-02-10 01:59:20 +0000
committerEric Fiselier <eric@efcs.ca>2017-02-10 01:59:20 +0000
commit87c87f4c3064ffb6aac01b2eff9189544a87b70b (patch)
tree8147d7cd71162e73fdd2222975e20b6fbe075ce2 /lld/lib/ReaderWriter
parentdc54df9ca2351e8f414dc6d8a50f8a8137d11335 (diff)
downloadbcm5719-llvm-87c87f4c3064ffb6aac01b2eff9189544a87b70b.tar.gz
bcm5719-llvm-87c87f4c3064ffb6aac01b2eff9189544a87b70b.zip
[CMake] Fix pthread handling for out-of-tree builds
LLVM defines `PTHREAD_LIB` which is used by AddLLVM.cmake and various projects to correctly link the threading library when needed. Unfortunately `PTHREAD_LIB` is defined by LLVM's `config-ix.cmake` file which isn't installed and therefore can't be used when configuring out-of-tree builds. This causes such builds to fail since `pthread` isn't being correctly linked. This patch attempts to fix that problem by renaming and exporting `LLVM_PTHREAD_LIB` as part of`LLVMConfig.cmake`. I renamed `PTHREAD_LIB` because It seemed likely to cause collisions with downstream users of `LLVMConfig.cmake`. llvm-svn: 294690
Diffstat (limited to 'lld/lib/ReaderWriter')
-rw-r--r--lld/lib/ReaderWriter/MachO/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/MachO/CMakeLists.txt b/lld/lib/ReaderWriter/MachO/CMakeLists.txt
index 3b0698525aa..5a96d87f1f7 100644
--- a/lld/lib/ReaderWriter/MachO/CMakeLists.txt
+++ b/lld/lib/ReaderWriter/MachO/CMakeLists.txt
@@ -28,7 +28,7 @@ add_lld_library(lldMachO
LINK_LIBS
lldCore
lldYAML
- ${PTHREAD_LIB}
+ ${LLVM_PTHREAD_LIB}
)
include_directories(.)
OpenPOWER on IntegriCloud