[Development] QProperty and library coding guide

Lars Knoll lars.knoll at qt.io
Fri Jul 17 18:34:54 CEST 2020


> On 17 Jul 2020, at 17:50, Thiago Macieira <thiago.macieira at intel.com> wrote:
> 
> On Friday, 17 July 2020 02:05:48 PDT Lars Knoll wrote:
>> Some older embedded toolchains don’t have the flag neither.
> 
> Then give them an option to opt out, at Qt configure time. That's a flag on 
> the same level as using -mfloat-abi=softfp instead of -mfloat-abi=hard or 
> using -stdlib=libc++ for Clang: completely ABI incompatible. But embedded 
> devices that build everything for the image in question can afford to make ABI 
> choices per version.

A configure option is perfectly fine for me :)
> 
> The same configure (ahem, cmake!) flag can be used to turn it on when it isn't 
> on by default. Such as when a new version of a compiler supports in 2021 or 
> later. Read: MSVC.
> 
> You may want to add this fact to archdetect.cpp (QSysInfo::buildAbi()). We can 
> also fix this automatically by having a variable that depends on the size of 
> QObject.
> 
> I'll just post this and let you ponder the consequences of this choice for 
> Linux:
> https://godbolt.org/z/nhex5x

Yes, that’s why we need to encode that into a static_assert(). But the support it coming to all compilers and Linux desktops will support the feature both with gcc and clang. I’m pretty sure ICC will follow soon.

Lars



More information about the Development mailing list