File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -309,14 +309,6 @@ macro(get_test_cc_for_arch arch cc_out cflags_out)
309309 endif ()
310310 string (REPLACE ";" " " ${cflags_out} "${${cflags_out} }" )
311311 endif ()
312- if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT ANDROID)
313- # ARM on Linux might use the slow unwinder as default and the unwind table
314- # is required to get a complete stacktrace.
315- string (APPEND ${cflags_out} " -funwind-tables" )
316- if (CMAKE_SYSROOT)
317- string (APPEND ${cflags_out} " --sysroot=${CMAKE_SYSROOT} " )
318- endif ()
319- endif ()
320312endmacro ()
321313
322314# Returns CFLAGS that should be used to run tests for the
Original file line number Diff line number Diff line change @@ -73,6 +73,17 @@ foreach(tool ${SUPPORTED_TOOLS})
7373 get_test_cc_for_arch(${arch} SANITIZER_COMMON_TEST_TARGET_CC SANITIZER_COMMON_TEST_TARGET_CFLAGS)
7474 set (CONFIG_NAME ${tool} -${arch} -${OS_NAME} )
7575
76+ # ARM on Linux might use the slow unwinder as default and the unwind table is
77+ # required to get a complete stacktrace.
78+ if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Linux" AND NOT ANDROID)
79+ list (APPEND SANITIZER_COMMON_TEST_TARGET_CFLAGS -funwind-tables)
80+ if (CMAKE_SYSROOT)
81+ list (APPEND SANITIZER_COMMON_TEST_TARGET_CFLAGS "--sysroot=${CMAKE_SYSROOT} " )
82+ endif ()
83+ string (REPLACE ";" " " SANITIZER_COMMON_TEST_TARGET_CFLAGS
84+ "${SANITIZER_COMMON_TEST_TARGET_CFLAGS} " )
85+ endif ()
86+
7687 configure_lit_site_cfg(
7788 ${CMAKE_CURRENT_SOURCE_DIR} /lit.site.cfg.py.in
7889 ${CMAKE_CURRENT_BINARY_DIR} /${CONFIG_NAME} /lit.site.cfg.py)
You can’t perform that action at this time.
0 commit comments