From 8741438b0af1b4b96f0db1300d9001f09c8aba51 Mon Sep 17 00:00:00 2001 From: Adonis Ling Date: Mon, 15 May 2023 11:01:05 +0800 Subject: [PATCH] fix compiler optimize thread local variable access on x86_64 --- src/butil/thread_local.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/butil/thread_local.h b/src/butil/thread_local.h index 4f77e95870..74f9533b9e 100644 --- a/src/butil/thread_local.h +++ b/src/butil/thread_local.h @@ -46,7 +46,7 @@ var_name = v; \ } -#if defined(__clang__) && (defined(__aarch64__) || defined(__arm64__)) +#if defined(__clang__) // Clang compiler is incorrectly caching the address of thread_local variables // across a suspend-point. The following macros used to disable the volatile // thread local access optimization.