[CMake] Fix MIPSr6 build for compiler-rt

The current version pass -mips64r2 or -mips32r2 options,
which make it failed to build on r6 platform.

In this patch: we detect whether we are MIPSr6 by
    _MIPS_ARCH_MIPS32R6/_MIPS_ARCH_MIPS64R6
The out and install path is set to the default triple instead of
hardcoded one, since the clang ask for it.

Differential Revision: https://reviews.llvm.org/D135735

GitOrigin-RevId: 9221aa6d649f0f3c9027525260cec1f06e33bb85
3 files changed