Pipeclean byo_llvm, add docs and support requested features. (#14164)
* Reworks LLVM/LLD/Clang/MLIR to use CMake initial-cache files to
configure distribution support
(https://llvm.org/docs/BuildingADistribution.html) for a more precise
build that better matches how the regular distributions are done. This
was suggested by a downstream user who helped work out the incantation.
* Implements libLLVM.so shared library redirection for LLVM
dependencies, when the backing LLVM is configured in such a way.
* Changes byo_llvm.sh to a shared-library based LLVM build.
* Fixes so that IREE can build against the installed MLIR, not just the
MLIR build tree.
* Fixes the iree-tblgen target to be correct in shared-library and
installed builds.
diff --git a/build_tools/cmake/build_and_test_byo_llvm.sh b/build_tools/cmake/build_and_test_byo_llvm.sh
index a2120ac..2b96c16 100755
--- a/build_tools/cmake/build_and_test_byo_llvm.sh
+++ b/build_tools/cmake/build_and_test_byo_llvm.sh
@@ -23,10 +23,10 @@
# but that exists for good reasons as some users need control more over the
# building and packaging than over the source repository, and that's good to
# have test coverage for, and of course that's more convenient for us to test.
-build_tools/scripts/byo_llvm.sh build_llvm
+build_tools/llvm/byo_llvm.sh build_llvm
-build_tools/scripts/byo_llvm.sh build_mlir
-build_tools/scripts/byo_llvm.sh build_iree
+build_tools/llvm/byo_llvm.sh build_mlir
+build_tools/llvm/byo_llvm.sh build_iree
echo "*********************** TESTING IREE **********************************"
iree_build_dir="${IREE_BYOLLVM_BUILD_DIR}/iree"