In this patch I added support to change the default target triple used by flang tests using the cmake variable: -DFLANG_TEST_TARGET_TRIPLE="xxx".
The motivation for this is that we build our full toolchain for multiple targets e.g. aarch64, arm32 etc but we set arm32 as the default triple and we want to enable flang build in our CI. Since arm32 has no flang support, a bunch of tests are failing. To enable flang in our CI, changing the flang test triple using -DFLANG_TEST_TARGET_TRIPLE="aarch64-linux-gnu" works in the interim.
Please let me know if something like this has any value to the community.