[PATCH] D29555: [CMake] Fix pthread handling for out-of-tree builds

Eric Fiselier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 4 19:14:43 PST 2017


EricWF created this revision.
Herald added a subscriber: mgorny.

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`.


Repository:
  rL LLVM

https://reviews.llvm.org/D29555

Files:
  cmake/config-ix.cmake
  cmake/modules/AddLLVM.cmake
  cmake/modules/LLVMConfig.cmake.in
  examples/ParallelJIT/CMakeLists.txt
  lib/CodeGen/CMakeLists.txt
  lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
  lib/Fuzzer/CMakeLists.txt
  lib/Support/CMakeLists.txt
  unittests/ExecutionEngine/Orc/CMakeLists.txt
  unittests/Support/CMakeLists.txt
  utils/unittest/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29555.87128.patch
Type: text/x-patch
Size: 5726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170205/ce1d59ba/attachment.bin>


More information about the llvm-commits mailing list