[CMake] Fix MIPSr6 build for compiler-rt
authorYunQiang Su <wzssyqa@gmail.com>
Tue, 18 Oct 2022 04:49:25 +0000 (04:49 +0000)
committerFangrui Song <i@maskray.me>
Tue, 18 Oct 2022 04:49:25 +0000 (04:49 +0000)
commit9221aa6d649f0f3c9027525260cec1f06e33bb85
treea79d4983055a367c2261c3329a53349a7e47812e
parenta8c92b69e72ea6234b52f9219071afc3f2d77ef6
[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
compiler-rt/CMakeLists.txt
compiler-rt/cmake/Modules/CompilerRTUtils.cmake
compiler-rt/cmake/base-config-ix.cmake