define GPR_ATTRIBUTE_NO_TSAN by using GPR_HAS_FEATURE.

pull/17939/head
xtao 6 years ago
parent 7766912dda
commit 7cbb42bb9e
No known key found for this signature in database
GPG Key ID: 87F7A86BDA3A0407
  1. 6
      include/grpc/impl/codegen/port_platform.h

@ -564,11 +564,9 @@ typedef unsigned __int64 uint64_t;
#endif /* GPR_ATTRIBUTE_WEAK */
#ifndef GPR_ATTRIBUTE_NO_TSAN /* (1) */
#if defined(__has_feature)
#if __has_feature(thread_sanitizer)
#if GPR_HAS_FEATURE(thread_sanitizer)
#define GPR_ATTRIBUTE_NO_TSAN __attribute__((no_sanitize("thread")))
#endif /* __has_feature(thread_sanitizer) */
#endif /* defined(__has_feature) */
#endif /* GPR_HAS_FEATURE */
#ifndef GPR_ATTRIBUTE_NO_TSAN /* (2) */
#define GPR_ATTRIBUTE_NO_TSAN
#endif /* GPR_ATTRIBUTE_NO_TSAN (2) */

Loading…
Cancel
Save