[compiler-rt] [rtsan][compiler-rt] Add 64 bit file interceptors, test for _FILE_OFFSET_BITS (PR #108057)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 12:07:55 PDT 2024
================
@@ -76,6 +76,18 @@ foreach(arch ${RTSAN_TEST_ARCH})
CFLAGS ${RTSAN_UNITTEST_CFLAGS} -fsanitize=realtime
LINK_FLAGS ${RTSAN_UNITTEST_LINK_FLAGS} -fsanitize=realtime)
+ check_symbol_exists(__GLIBC__ stdio.h RTSAN_USING_GLIBC)
+ if (RTSAN_USING_GLIBC)
+ set(RtsanTestObjects_FileOffset64)
+ generate_compiler_rt_tests(RtsanTestObjects_FileOffset64
+ RtsanUnitTests "Rtsan-${arch}-FileOffset64-Test" ${arch}
+ COMPILE_DEPS ${RTSAN_UNITTEST_HEADERS}
+ SOURCES ${RTSAN_INST_TEST_SOURCES} ${COMPILER_RT_GOOGLETEST_SOURCES}
----------------
davidtrevelyan wrote:
Why do we need to compile all the test source files again here in a new target? I don't yet understand why it's not OK just to define `-D_FILE_OFFSET_BITS=64` here on the single test target instead...
https://github.com/llvm/llvm-project/pull/108057
More information about the llvm-commits
mailing list