[compiler-rt] Let CMake search for thread support

This is an educated guess to fix sanitizer-x86_64-linux after r354132.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354143 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 90192f7..a89ae7f 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -120,6 +120,8 @@
 check_library_exists(pthread pthread_create "" COMPILER_RT_HAS_LIBPTHREAD)
 check_library_exists(execinfo backtrace "" COMPILER_RT_HAS_LIBEXECINFO)
 
+find_package(Threads)
+
 # Look for terminfo library, used in unittests that depend on LLVMSupport.
 if(LLVM_ENABLE_TERMINFO)
   foreach(library terminfo tinfo curses ncurses ncursesw)