Qbs Manual | List of Modules | Module cpufeatures

Qbs 1.10.1

# Module cpufeatures

The `cpufeatures` module offers properties for enabling or disabling specific CPU features. Use it if you want to override the compiler defaults for a given platform.

The compiler rules in the cpp module evaluate this module's properties and generate matching compiler flags. All properties in this module are of type `bool` and have the following semantics:

- The default value `undefined` has no effect on the compiler command line.
- If the value is `true` and the compiler has a flag to enable the feature, that flag is added to the command line if it is applicable to the current architecture. For example, enabling the property `x86_sse2` would result in the GCC option `-msse2`.
- If the value is `false` and the compiler has a flag to disable the feature, that flag is added to the command line if it is applicable to the current architecture. For example, disabling the property `x86_sse2` would result in the GCC option `-no-msse2`.

## cpufeatures Properties

Property | Type | Since | Default | Description
--- | --- | --- | --- | ---
arm_neon | bool | 1.10 | undefined | Whether to use NEON instructions in ARM binaries.
arm_vfpv4 | bool | 1.10 | undefined | Whether to use VFPv4 instructions in ARM binaries.
mips_dsp | bool | 1.10 | undefined | Whether to use DSP instructions in MIPS binaries.
mips_dspr2 | bool | 1.10 | undefined | Whether to use DSPr2 instructions in MIPS binaries.
x86_avx | bool | 1.10 | undefined | Whether to use AVX instructions in x86 binaries.
x86_avx2 | bool | 1.10 | undefined | Whether to use AVX2 instructions in x86 binaries.
x86_avx512bw | bool | 1.10 | undefined | Whether to use AVX-512-BW instructions in x86 binaries.
x86_avx512cd | bool | 1.10 | undefined | Whether to use AVX-512-CD instructions in x86 binaries.
x86_avx512dq | bool | 1.10 | undefined | Whether to use AVX-512-DQ instructions in x86 binaries.
x86_avx512er | bool | 1.10 | undefined | Whether to use AVX-512-ER instructions in x86 binaries.
x86_avx512f | bool | 1.10 | undefined | Whether to use AVX-512 instructions in x86 binaries.
x86_avx512ifma | bool | 1.10 | undefined | Whether to use AVX-512-IFMA instructions in x86 binaries.
x86_avx512pf | bool | 1.10 | undefined | Whether to use AVX-512-PF instructions in x86 binaries.
x86_avx512vbmi | bool | 1.10 | undefined | Whether to use AVX-512-VBMI instructions in x86 binaries.
x86_avx512vl | bool | 1.10 | undefined | Whether to use AVX-512-VL instructions in x86 binaries.
x86_f16c | bool | 1.10 | undefined | Whether to use F16C instructions in x86 binaries.
x86_sse2 | bool | 1.10 | undefined | Whether to use SSE2 instructions in x86 binaries.
x86_sse3 | bool | 1.10 | undefined | Whether to use SSE3 instructions in x86 binaries.
x86_ssse3 | bool | 1.10 | undefined | Whether to use SSSE3 instructions in x86 binaries.
x86_sse4_1 | bool | 1.10 | undefined | Whether to use SSE4.1 instructions in x86 binaries.
x86_sse4_2 | bool | 1.10 | undefined | Whether to use SSE4.2 instructions in x86 binaries.