Skip to content

Commit 5120ad8

Browse files
authored
Merge pull request wolfpld#925 from TroutZhang/patch-1
Fix crash on Android due to wrong TLS model
2 parents 0cac843 + 339a92a commit 5120ad8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎public/client/tracy_rpmalloc.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,9 @@ static pthread_key_t _memory_thread_heap;
690690
# define _Thread_local __declspec(thread)
691691
# define TLS_MODEL
692692
# else
693-
# ifndef __HAIKU__
693+
# if defined(__ANDROID__) && __ANDROID_API__ >= 29 && defined(__NDK_MAJOR__) && __NDK_MAJOR__ >= 26
694+
# define TLS_MODEL __attribute__((tls_model("local-dynamic")))
695+
# elif !defined(__HAIKU__)
694696
# define TLS_MODEL __attribute__((tls_model("initial-exec")))
695697
# else
696698
# define TLS_MODEL

0 commit comments

Comments
 (0)