]> granicus.if.org Git - llvm/commit
Merging r294690:
authorTom Stellard <tstellar@redhat.com>
Fri, 19 May 2017 01:55:05 +0000 (01:55 +0000)
committerTom Stellard <tstellar@redhat.com>
Fri, 19 May 2017 01:55:05 +0000 (01:55 +0000)
commitf717a4e7508744a863ac13c87439444b37bf7cd0
tree09e7d0a2460c8b98e75deef38c1cb35222f0145e
parent5ed13a6cd922be74ad12b1ba36c15906336e0e3b
Merging r294690:

------------------------------------------------------------------------
r294690 | ericwf | 2017-02-09 20:59:20 -0500 (Thu, 09 Feb 2017) | 13 lines

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@303399 91177308-0d34-0410-b5e6-96231b3b80d8
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