[compiler-rt][cmake][mips] Use -mabi option to select target architecture

The `--target` option is rejected by GCC starting from version 7.0.
It's shorter and more portable to use `mabi` option to select MIPS ABI
for testing target architecture. Clang supports that starting from r343169.

llvm-svn: 343182
This commit is contained in:
Simon Atanasyan 2018-09-27 07:17:00 +00:00
parent e40db05b27
commit ab4f15e20c
1 changed files with 4 additions and 4 deletions

View File

@ -191,11 +191,11 @@ macro(test_targets)
# clang's default CPU's. In the 64-bit case, we must also specify the ABI
# since the default ABI differs between gcc and clang.
# FIXME: Ideally, we would build the N32 library too.
test_target_arch(mipsel "" "-mips32r2" "--target=mipsel-linux-gnu")
test_target_arch(mips64el "" "-mips64r2" "--target=mips64el-linux-gnu" "-mabi=64")
test_target_arch(mipsel "" "-mips32r2" "-mabi=32")
test_target_arch(mips64el "" "-mips64r2" "-mabi=64")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips")
test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu")
test_target_arch(mips64 "" "-mips64r2" "--target=mips64-linux-gnu" "-mabi=64")
test_target_arch(mips "" "-mips32r2" "-mabi=32")
test_target_arch(mips64 "" "-mips64r2" "-mabi=64")
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
if(WIN32)
test_target_arch(arm "" "" "")