Without this change the problem is that flangOmpReport and
flangPrintFunctionNames libraries are not built under 'all',
but they are imported targets via LLVMExports.cmake so that
any out-of-tree build that configures upon LLVM+Flang package
will get this CMake error:
The imported target "flangPrintFunctionNames" references the file ".../lib/flangPrintFunctionNames.so" but this file does not exist.
flang-aarch64-out-of-tree buildbot (https://lab.llvm.org/buildbot/#/builders/175)
does not catch this issue, because it does not enable Flang on the first stage.
The change is to adapt the LLVM macros from AddLLVM.cmake.
This is mostly a copy-paste, and it adds some maintenance burden
for Flang. Another option is to replace FLANG_BUILD_EXAMPLES
with LLVM_BUILD_EXAMPLES and just use the LLVM macros.