[Development] Disabling thread safe static guards
Thiago Macieira
thiago.macieira at intel.com
Mon Jun 29 22:02:42 CEST 2015
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
More information about the Development
mailing list