ASM: Fix using GNU 'as' tool as CMAKE_ASM_COMPILER
The GNU as --help
shows --MD <file>
as an option to generate depfiles as needed by Ninja. There is no -MT <target>
flag but fortunately the generated files automatically account for the -o <obj>
flag.
Also port the change from commit d751d2d2 to CMAKE_DETERMINE_COMPILER_ID_VENDOR
so that we can recognize the GNU assembler
output in non-C locales.
Issue: #20426