The added option allows the user to specify the target for which clang-tidy checks will be executed. This is necessary for users who run the tool on project that compiles for a different target platform.
This option also makes it easier to test of clang-tidy and allows to run platform-specific tests on any host system.
This will fix the failed tests when they are run on a Windows host, but the toolchain is targeted a non-Windows platform. The problem is described here: https://reviews.llvm.org/D101259#2739466.