From 7cbb42bb9ec05a0122dcae70b03aac381293f9e6 Mon Sep 17 00:00:00 2001 From: xtao Date: Thu, 14 Feb 2019 10:20:11 +0800 Subject: [PATCH] define GPR_ATTRIBUTE_NO_TSAN by using GPR_HAS_FEATURE. --- include/grpc/impl/codegen/port_platform.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index af114de4153..a6bbe66e248 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/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) */