This patch enables the above cmake option, which builds most libraries
as DLLs instead of statically linked libraries. The main effect of this is
that incrememntal build times are greatly reduced, since usually only one
library need be relinked in response to isolated code changes.
The bulk of this patch is fixing incorrect usage of cmake, where library
dependencies are listed under add_dependencies rather than under
target_link_libraries or under the LINK_LIBS tag. Correct usage should be
like this:
add_dependencies(MLIRfoo MLIRfooIncGen)
target_link_libraries(MLIRfoo MLIRlib1 MLIRlib2)