option(SANITIZER_USE_STATIC_LLVM_UNWINDER
"Use static LLVM unwinder." ${DEFAULT_SANITIZER_USE_STATIC_LLVM_UNWINDER})
+pythonize_bool(SANITIZER_USE_STATIC_LLVM_UNWINDER)
set(DEFAULT_SANITIZER_USE_STATIC_CXX_ABI OFF)
if (DEFINED LIBCXXABI_ENABLE_SHARED AND NOT LIBCXXABI_ENABLE_SHARED)
if not getattr(config, 'sanitizer_uses_static_cxxabi', False):
config.available_features.add('shared_cxxabi')
+if not getattr(config, 'sanitizer_uses_static_unwind', False):
+ config.available_features.add('shared_unwind')
+
if config.has_lld:
config.available_features.add('lld-available')
set_default("apple_platform_min_deployment_target_flag", "-mmacosx-version-min")
set_default("sanitizer_can_use_cxxabi", @SANITIZER_CAN_USE_CXXABI_PYBOOL@)
set_default("sanitizer_uses_static_cxxabi", @SANITIZER_USE_STATIC_CXX_ABI_PYBOOL@)
+set_default("sanitizer_uses_static_unwind", @SANITIZER_USE_STATIC_LLVM_UNWINDER_PYBOOL@)
set_default("has_lld", @COMPILER_RT_HAS_LLD_PYBOOL@)
set_default("can_symbolize", @CAN_SYMBOLIZE@)
set_default("use_lld", @COMPILER_RT_TEST_USE_LLD_PYBOOL@)
// memcpy/memmove calls. It builds the binary with TSan and check's
// its objdump.
+// This could fail if using a static libunwind because that static libunwind
+// could be uninstrumented and contain memcpy/memmove calls not intercepted by
+// tsan.
+// REQUIRES: shared_unwind
+
// RUN: %clang_tsan -O1 %s -o %t
// RUN: llvm-objdump -d -l %t | FileCheck %s