Skip to content

Commit

Permalink
enabled thread_local for clang >=14.0.4 for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Jun 7, 2022
1 parent 3c07dc0 commit 6bc5d75
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions include/orm/macros/threadlocal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ TINY_SYSTEM_HEADER

#include <QtConfig>

// BUG TLS, clang linux crashes, gcc mingw lld/ld doesn't compile (duplicit tls), clang mingw ld stdlib weird 100,000 linker errors (COMDAT symbol xyz does not match section name), clang mingw lld stdlib works, but I'm giving up this clang MinGW support because still occasional crashes on TLS exit/destruction, it crashes around 1 time from 5, and now I have discovered that Clang 13 on Linux works, something was fixed in Clang 13?, so I'm enabling support for Clang >=13 on Linux, AND NOW with clang >= 13 and Qt 6.2.2 crashes again, Qt 5.15.2 is not crashing, Clang is king 😂🤣🤯, 02.01.2022 - now I have discovered that TinyOrmPlayground crashes even with Clang 13 and Qt 5.15.2, so I'm disabling thread_local for Clang on Linux silverqx
#if !defined(__clang__) && \
!(defined(__GNUG__) && !defined(__clang__) && defined(__MINGW32__)) && \
!defined TINYORM_DISABLE_THREAD_LOCAL
// BUG TLS, clang linux crashes, gcc mingw lld/ld doesn't compile (duplicit tls), clang mingw ld stdlib weird 100,000 linker errors (COMDAT symbol xyz does not match section name), clang mingw lld stdlib works, but I'm giving up this clang MinGW support because still occasional crashes on TLS exit/destruction, it crashes around 1 time from 5, and now I have discovered that Clang 13 on Linux works, something was fixed in Clang 13?, so I'm enabling support for Clang >=13 on Linux, AND NOW with clang >= 13 and Qt 6.2.2 crashes again, Qt 5.15.2 is not crashing, Clang is king 😂🤣🤯, 02.01.2022 - now I have discovered that TinyOrmPlayground crashes even with Clang 13 and Qt 5.15.2, so I'm disabling thread_local for Clang on Linux. New INFO Clang 14.0.4, no crashes with Qt 5.15.2/Qt 6.2.4 and also TinyOrmPlayground works, so I'm enabling for >=Clang 14.0.4 🤯 silverqx
#if !(defined(__clang__) && defined(__MINGW32__)) && \
!(defined(__clang__) && !defined(__MINGW32__) && \
(__clang_major__ < 14 || \
(__clang_major__ == 14 && __clang_minor__ == 0 && __clang_patchlevel__ < 4))) && \
!(defined(__GNUG__) && !defined(__clang__) && defined(__MINGW32__)) && \
!defined(TINYORM_DISABLE_THREAD_LOCAL)
# define T_THREAD_LOCAL thread_local
#endif

Expand Down

0 comments on commit 6bc5d75

Please sign in to comment.