Vendor import of compiler-rt release_80 branch r363030:
https://llvm.org/svn/llvm-project/compiler-rt/branches/release_80@363030
This commit is contained in:
parent
70b4e3ee53
commit
90579156da
@ -195,10 +195,10 @@ 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" "-mabi=32")
|
||||
test_target_arch(mipsel "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
|
||||
test_target_arch(mips64el "" "-mips64r2" "-mabi=64")
|
||||
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips")
|
||||
test_target_arch(mips "" "-mips32r2" "-mabi=32")
|
||||
test_target_arch(mips "" "-mips32r2" "-mabi=32" "-D_LARGEFILE_SOURCE" "-D_FILE_OFFSET_BITS=64")
|
||||
test_target_arch(mips64 "" "-mips64r2" "-mabi=64")
|
||||
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
|
||||
if(WIN32)
|
||||
|
@ -124,7 +124,9 @@
|
||||
#include <dev/isa/isvio.h>
|
||||
#include <dev/isa/wtreg.h>
|
||||
#include <dev/iscsi/iscsi_ioctl.h>
|
||||
#if 0
|
||||
#include <dev/nvmm/nvmm_ioctl.h>
|
||||
#endif
|
||||
#include <dev/ofw/openfirmio.h>
|
||||
#include <dev/pci/amrio.h>
|
||||
#include <dev/pci/mlyreg.h>
|
||||
|
@ -48,8 +48,7 @@ endfunction()
|
||||
|
||||
set(XRAY_TEST_ARCH ${XRAY_SUPPORTED_ARCH})
|
||||
set(XRAY_UNITTEST_LINK_FLAGS
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
-l${SANITIZER_CXX_ABI_LIBRARY})
|
||||
${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if (NOT APPLE)
|
||||
# Needed by LLVMSupport.
|
||||
@ -81,6 +80,8 @@ if (NOT APPLE)
|
||||
append_list_if(COMPILER_RT_HAS_LIBEXECINFO -lexecinfo XRAY_UNITTEST_LINK_FLAGS)
|
||||
endif()
|
||||
|
||||
list(APPEND XRAY_UNITTEST_LINK_FLAGS -l${SANITIZER_CXX_ABI_LIBRARY})
|
||||
|
||||
macro(add_xray_unittest testname)
|
||||
cmake_parse_arguments(TEST "" "" "SOURCES;HEADERS" ${ARGN})
|
||||
if(UNIX AND NOT APPLE)
|
||||
|
@ -37,6 +37,10 @@ double cases[] = {
|
||||
};
|
||||
|
||||
int main() {
|
||||
// Do not the run the compiler-rt logb test case if using GLIBC version
|
||||
// < 2.23. Older versions might not compute to the same value as the
|
||||
// compiler-rt value.
|
||||
#if !defined(__GLIBC__) || (defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 23))
|
||||
const unsigned N = sizeof(cases) / sizeof(cases[0]);
|
||||
unsigned i;
|
||||
for (i = 0; i < N; ++i) {
|
||||
@ -58,6 +62,9 @@ int main() {
|
||||
if (test__compiler_rt_logb(fromRep(signBit ^ x))) return 1;
|
||||
x >>= 1;
|
||||
}
|
||||
#else
|
||||
printf("skipped\n");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user