[compiler-rt] ba99359 - [compiler-rt][asan] Enable unwind-tables for Arm Linux
David Spickett via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 2 05:59:52 PDT 2021
Author: David Spickett
Date: 2021-06-02T12:59:46Z
New Revision: ba99359796bae116d2bd6b2ac828f3e1e664031f
URL: https://github.com/llvm/llvm-project/commit/ba99359796bae116d2bd6b2ac828f3e1e664031f
DIFF: https://github.com/llvm/llvm-project/commit/ba99359796bae116d2bd6b2ac828f3e1e664031f.diff
LOG: [compiler-rt][asan] Enable unwind-tables for Arm Linux
Since https://reviews.llvm.org/D102046 some tests have
been falling back to fast unwinding on our Thumb bot.
This fails because fast unwinding does not work on Thumb.
By adding the extra information we ensure this does not happen
during testing, but the built library can still fast unwind
as a last resort.
Since there are some situations it can work in, like if
eveything is built with clang. During testing we've got gcc
built system libs and clang built tests.
The same change was made for sanitizer-common in
https://reviews.llvm.org/D96337.
Reviewed By: zatrazz
Differential Revision: https://reviews.llvm.org/D103463
Added:
Modified:
compiler-rt/test/asan/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/test/asan/CMakeLists.txt b/compiler-rt/test/asan/CMakeLists.txt
index 855fac4f039f6..9f53384876fbe 100644
--- a/compiler-rt/test/asan/CMakeLists.txt
+++ b/compiler-rt/test/asan/CMakeLists.txt
@@ -71,6 +71,12 @@ foreach(arch ${ASAN_TEST_ARCH})
list(APPEND ASAN_DYNAMIC_TESTSUITES
${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
endif()
+
+ # ARM on Linux may include thumb code, where fast unwinding does not work.
+ # Enable unwind tables so that we do not end up falling back to it in tests.
+ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT ANDROID AND ${arch} MATCHES "arm")
+ set(ASAN_TEST_TARGET_CFLAGS "${ASAN_TEST_TARGET_CFLAGS} -funwind-tables")
+ endif()
endforeach()
# iOS and iOS simulator test suites
More information about the llvm-commits
mailing list