Previously, I thought that install-liblldb would fail because CMake had
a bug related to installing frameworks. In actuality, I misunderstood the
semantics of add_custom_target: the DEPENDS option refers to specific files,
not targets. Therefore install-liblldb should rely on the actual liblldb
getting generated rather than the target.
This means that the previous patch I committed (to stop relying on CMake's
framework support) is no longer needed and has been reverted. Using CMake's
framework support greatly simplifies the implementation.
install-lldb-framework (and the stripped variant) is as simple as
depending on install-liblldb because CMake knows that liblldb was built as a
framework and will install the whole framework for you. The stripped variant
will depend on the stripped variants of individual tools only to ensure they
actually are stripped as well.
Shouldn't this be also guarded under the NOT LLVM_INSTALL_TOOLCHAIN_ONLY, like the code above? If someone sets LLVM_INSTALL_TOOLCHAIN_ONLY=True, then the install-liblldb target will not even be generated and these lines will fail (or just do something weird).