[Interest] Qt Application - Disabling AVX/AVX2

Allan Sandfeld Jensen kde at carewolf.com
Wed Apr 22 17:35:56 CEST 2020


On Mittwoch, 22. April 2020 17:29:56 CEST coroberti . wrote:
> On Wed, Apr 22, 2020 at 6:17 PM Thiago Macieira
> 
> <thiago.macieira at intel.com> wrote:
> > On Tuesday, 21 April 2020 14:26:13 PDT coroberti . wrote:
> > > Hi,
> > > Is it enough to define:
> > > 
> > > QMAKE_CFLAGS -= -arch:AVX -arch:AVX2
> > > QMAKE_CXXFLAGS -=  -arch:AVX -arch:AVX2
> > > 
> > > to ensure that compilation by QtCreator with Qt-5.14-MSVC Windows
> > > will not compile with such optimization flags even if avx and avx2
> > > instructions have not been disabled in Qt-library itself?
> > 
> > Since those options aren't added to the CFLAGS or CXXFLAGS in the first
> > place, by default what you're tryng to do is a no-op.
> > Why do you think there are AVX instructions in your binary? And how did
> > you
> > turn them on in the first place?
> > Thiago Macieira - thiago.macieira (AT) intel.com
> > 
> >   Software Architect - Intel System Software Products
> 
> Thank you for your reply.
> 
> Building 5.14.2, I was alerted by report from config that avx
> instructions are enabled.
> 
> Clear, I need to investigate it more.
> 
Probably support for them is enabled, but not turned on. That is what we do in 
qtbase, build only some files with AVX enabled and switch to them on at 
runtime.

'Allan




More information about the Interest mailing list