Resubmit "Add a shared llvm.lit module that all test suites can use."

There were some issues surrounding Py2 / Py3 compatibility, but
I've now tested with both Py2 and Py3 and everything seems to
work.

llvm-svn: 313467
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 54807dc..6e0aace 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -1173,6 +1173,10 @@
     set(TARGET_TRIPLE "\"+config.target_triple+\"")
   endif()
 
+  string(CONCAT LIT_SITE_CFG_IN_FOOTER
+     "import lit.llvm\n"
+     "lit.llvm.initialize(lit_config, config)\n")
+
   configure_file(${input} ${output} @ONLY)
   get_filename_component(INPUT_DIR ${input} DIRECTORY)
   if (EXISTS "${INPUT_DIR}/lit.cfg")