Simplify cross-compilation. Don't use native-compiled llvm-config. Instead use CMake's find_package() feature. This assumes CMAKE_PREFIX_PATH contains a path to the LLVM install directory.
Note: AddLLVM.cmake does not expose the LLVM source directory.
So if you want to run the test suite, you need to either: 1) set LLVM_MAIN_SRC_DIR explicitly (to find lit.py) 2) change AddLLVM.cmake to point to an installed 'lit'. 3) add_subdirectory(compiler-rt/test) from clang instead of compiler-rt.
Will this work for multi-configuration build systems (the ones that can build Debug and Release binaries in a single build tree)?