[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
This commit is contained in:
parent
e1a150846d
commit
ba99359796
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue