[compiler-rt][test] Heed COMPILER_RT_DEBUG when compiling unittests
When trying to debug some `compiler-rt` unittests, I initially had a hard time because - even in a `Debug` build one needs to set `COMPILER_RT_DEBUG` to get debugging info for some of the code and - even so the unittests used a hardcoded `-O2` which often makes debugging impossible. This patch addresses this by instead using `-O0` if `COMPILER_RT_DEBUG`. Two tests in `sanitizer_type_traits_test.cpp` need to be disabled since they have undefined references to `__sanitizer::integral_constant<bool, true>::value`. Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`. Differential Revision: https://reviews.llvm.org/D91620
Loading
Please sign in to comment