Edit

Share via


/feature (ARM64)

Enable one or more Arm A-Profile architecture features for an ARM64 extension as specified by /arch (ARM64). For more information about /arch (ARM64), see /arch (ARM64).

Syntax

/feature:<arg1>[+arg2]

Arguments

To enable one or more features the targeted ARM64 extension supports, specify one or more of the following feature arguments:

Feature argument Feature identifier Optional from Enabled by default Description
lse FEAT_LSE Armv8.0 Armv8.1 Large System Extensions.
rcpc FEAT_LRCPC Armv8.2 Armv8.3 Load-Acquire RCpc instructions.

Remarks

Example usage: to enable FEAT_LSE, specify /feature:lse.

If there are conflicting feature arguments specified by /feature, the right-most feature is enabled. Enabling a feature the targeted ARM64 extension doesn't support may cause unexpected behavior, especially if a CPU doesn't implement the feature.

Use either /feature or only /arch (ARM64) to specify features. For example, to enable FEAT_LSE when targeting Armv8.0-A, use both /feature:lse and /arch:armv8.0, or specify /arch:armv8.0+lse. /feature is a way to specify features without specifying them in /arch (ARM64).

To set the /feature compiler option in Visual Studio

  1. Open the Property Pages dialog box for the project. For more information, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > C/C++ > Command Line property page.

  3. In the Additional options box, add /feature:lse or replace lse with the feature to enable. Choose OK to save your changes.

To set this compiler option programmatically

See also

/arch (Minimum CPU architecture)
MSVC compiler options
MSVC compiler command-line syntax