[all-commits] [llvm/llvm-project] 255c3e: Reland "[compiler-rt][test] Heed COMPILER_RT_DEBUG...
rorth via All-commits
all-commits at lists.llvm.org
Tue Dec 13 01:59:27 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 255c3e3dcb06299aa2365f70817322a8a381c351
https://github.com/llvm/llvm-project/commit/255c3e3dcb06299aa2365f70817322a8a381c351
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2022-12-13 (Tue, 13 Dec 2022)
Changed paths:
M compiler-rt/CMakeLists.txt
M compiler-rt/lib/asan/tests/CMakeLists.txt
M compiler-rt/lib/fuzzer/tests/CMakeLists.txt
M compiler-rt/lib/gwp_asan/tests/CMakeLists.txt
M compiler-rt/lib/interception/tests/CMakeLists.txt
M compiler-rt/lib/msan/tests/CMakeLists.txt
M compiler-rt/lib/sanitizer_common/sanitizer_type_traits.h
M compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
M compiler-rt/lib/sanitizer_common/tests/sanitizer_type_traits_test.cpp
M compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
M compiler-rt/test/tsan/Linux/check_memcpy.c
Log Message:
-----------
Reland "[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`.
Changes relative to the previous commit:
- Use `string(APPEND)` for `COMPILER_RT_TEST_COMPILER_CFLAGS`.
- Omit `-O3` from `COMPILER_RT_TEST_COMPILER_CFLAGS` in non-debug builds for now.
- Provide `__sanitizer::integral_constant<bool, true>::value` instantiation
for `sanitizer_type_traits_test.cpp` in debug builds.
- Disable subtests of `tsan/tests/unit/tsan_trace_test.cpp` that deadlock
in debug builds.
- `XFAIL` `tsan/Linux/check_memcpy.c` in debug builds.
Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and
`x86_64-pc-linux-gnu`.
Differential Revision: https://reviews.llvm.org/D91620
More information about the All-commits
mailing list