Skip to content

Commit

Permalink
enabled thread_local on Linux and MSYS2
Browse files Browse the repository at this point in the history
It started working finally, so enabling for Clang >= 14.0.3 on MSYS2
and for Clang >= 14.0.4 on Linux.

Still disabled for clang-cl with MSVC and g++ on MSYS2.
  • Loading branch information
silverqx committed Jun 7, 2022
1 parent 6bc5d75 commit 1f3dbfc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions include/orm/macros/threadlocal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ 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. 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__) && \
// 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 on Linux and for >=Clang 14.0.3 also on MSYS2 🤯 silverqx
/* To be clear disabled on:
MSYS2 Clang <14.0.3
clang-cl with MSVC
Linux Clang <14.0.4
MSYS2 g++ */
#if !(defined(__clang__) && defined(__MINGW32__) && !defined(__linux__) && \
(__clang_major__ < 14 || \
(__clang_major__ == 14 && __clang_minor__ == 0 && __clang_patchlevel__ < 3))) && \
!(defined(__clang__) && !defined(__MINGW32__) && defined(_MSC_VER)) && \
!(defined(__clang__) && !defined(__MINGW32__) && defined(__linux__) && \
(__clang_major__ < 14 || \
(__clang_major__ == 14 && __clang_minor__ == 0 && __clang_patchlevel__ < 4))) && \
!(defined(__GNUG__) && !defined(__clang__) && defined(__MINGW32__)) && \
Expand Down

0 comments on commit 1f3dbfc

Please sign in to comment.