clang/lib/Driver/ToolChains/Clang.cpp has a lot of fragments like the following:
if (const Arg *A = Args.getLastArg(...)) { if (Triple is xxx) A->render(Args, CmdArgs); else D.Diag(diag::err_drv_unsupported_opt_for_target) << ...; }
The problem is more apparent with a recent surge of AIX-specific options.
Introduce the TargetSpecific flag so that we can move the target-specific
options to ToolChains/*.cpp and ToolChains/Arch/*.cpp and overload the
warn_drv_unused_argument mechanism to give an err_drv_unsupported_opt_for_target
error.
Migrate -march=/-mcpu= and some AIX-specific options to use this simplified pattern.