[Development] Disabling thread safe static guards
Hi, Can we disable gcc's feature of emitting extra code to make local static initialization thread safe ? (-fno-threadsafe-statics) Since MSVC doesn't support it we can't rely on this feature in cross-platform Qt code (maybe only in QPA code). Generates uneeded code and helps hidding crashes that developers using Linux don't notice. Regards, -- Sérgio Martins | sergio.mart...@kdab.com | Software Engineer Klarälvdalens Datakonsult AB, a KDAB Group company Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322) KDAB - The Qt Experts smime.p7s Description: S/MIME cryptographic signature ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Disabling thread safe static guards
On Monday 29 June 2015 19:44:49 Sergio Martins wrote: Hi, Can we disable gcc's feature of emitting extra code to make local static initialization thread safe ? (-fno-threadsafe-statics) No. Since MSVC doesn't support it we can't rely on this feature in cross-platform Qt code (maybe only in QPA code). Correct. Generates uneeded code and helps hidding crashes that developers using Linux don't notice. The code is needed because we use it in Q_GLOBAL_STATIC. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Disabling thread safe static guards
On Monday 29 June 2015 13:02:42 Thiago Macieira wrote: Since MSVC doesn't support it we can't rely on this feature in cross-platform Qt code (maybe only in QPA code). Correct. Also, it's one of the C++11 features. It's tracked as Q_COMPILER_THREADSAFE_STATICS and is supported in MSVC since 2015. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development