hanchenye-llvm-project/compiler-rt/cmake/Modules
Rainer Orth 4a9a772f44 Enable compiler-rt on SPARC
This patch enables compiler-rt on SPARC targets. Most of the changes are straightforward:

- Add 32 and 64-bit sparc to compiler-rt

- lib/builtins/fp_lib.h needed to check if the int128_t and uint128_t types exist (which they don't on sparc)

There's one issue of note: many asan tests fail to compile on Solaris/SPARC:

fatal error: error in backend: Function "_ZN7testing8internal16BoolFromGTestEnvEPKcb": over-aligned dynamic alloca not supported.

Therefore, while asan is still built, both asan and ubsan-with-asan testing is disabled. The
goal is to check if asan keeps compiling on Solaris/SPARC. This serves asan in gcc,
which doesn't have the problem above and works just fine.

With this patch, sparcv9-sun-solaris2.11 test results are pretty good:

Failing Tests (9):
    Builtins-sparc-sunos :: divtc3_test.c
    Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c
    Builtins-sparcv9-sunos :: divtc3_test.c
[...]
    UBSan-Standalone-sparc :: TestCases/TypeCheck/misaligned.cpp
    UBSan-Standalone-sparcv9 :: TestCases/TypeCheck/misaligned.cpp

The builtin failures are due to Bugs 42493 and 42496. The tree contained a few additonal
patches either currently in review or about to be submitted.

Tested on sparcv9-sun-solaris2.11.

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

llvm-svn: 365880
2019-07-12 08:30:17 +00:00
..
CustomLibcxx [compiler-rt] Build custom libc++abi without exceptions. 2019-04-25 18:14:24 +00:00
AddCompilerRT.cmake Use CMAKE_C_COMPILER_ARG1 in compiler invocation 2019-05-19 03:29:15 +00:00
BuiltinTests.cmake
CompilerRTCompile.cmake
CompilerRTDarwinUtils.cmake Specify log level for CMake messages (less stderr) 2019-06-19 15:25:32 +00:00
CompilerRTLink.cmake
CompilerRTUtils.cmake Enable compiler-rt on SPARC 2019-07-12 08:30:17 +00:00
HandleCompilerRT.cmake
SanitizerUtils.cmake [compiler-rt] Respect CMAKE_NM 2019-06-15 04:40:16 +00:00
UseLibtool.cmake [builtins] Use libtool for builtins when building for Apple platform 2019-06-04 02:38:15 +00:00