[PATCH] D60644: [compiler-rt][builtins][sanitizers] Update compiler-rt test cases for compatibility with system's toolchain

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 26 13:55:56 PDT 2019


amyk marked an inline comment as done.
amyk added inline comments.


================
Comment at: compiler-rt/test/builtins/Unit/compiler_rt_logb_test.c:42
+  // compute to the same value as the compiler-rt value.
+#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
+    defined (__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 23)
----------------
hubert.reinterpretcast wrote:
> I think the test should continue to run on non-GLIBC systems.
> ```
>   // 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))
> ```
> 
> The `__GLIBC_PREREQ` checking used in the above is based on how `compiler-rt/test/sanitizer_common/TestCases/Linux/mprobe.cc` uses that macro.
Yeah, what you're saying makes sense. I have updated the patch to reflect this and for more consistent use of the `_GLIBC_PREREQ` macro. Thank you. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60644/new/

https://reviews.llvm.org/D60644





More information about the llvm-commits mailing list