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)
309
309
endif ()
310
310
string (REPLACE ";" " " ${cflags_out} "${${cflags_out} }" )
311
311
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 ()
320
312
endmacro ()
321
313
322
314
# 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})
73
73
get_test_cc_for_arch (${arch} SANITIZER_COMMON_TEST_TARGET_CC SANITIZER_COMMON_TEST_TARGET_CFLAGS )
74
74
set (CONFIG_NAME ${tool} -${arch}-${OS_NAME} )
75
75
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
+
76
87
configure_lit_site_cfg (
77
88
${CMAKE_CURRENT_SOURCE_DIR} /lit.site.cfg.py.in
78
89
${CMAKE_CURRENT_BINARY_DIR} /${CONFIG_NAME}/lit.site.cfg.py )
You can’t perform that action at this time.
0 commit comments