description | title | ms.date |
---|---|---|
Learn more about: /arch (ARM64) |
/arch (ARM64) |
08/30/2022 |
Specifies the architecture for code generation on ARM64. For more information on /arch
for other target architectures, see /arch
(x86), /arch
(x64), and /arch
(ARM).
/arch:
[armv8.0
-armv8.8
]
/arch:armv8.0
through /arch:armv8.8
Optional. Specifies minimum CPU extension requirements for ARMv8.x-A. The default is /arch:armv8.0
.
You may specify a CPU extension requirement from Armv8.0-A through Armv8.8-A. However, depending on your version of Visual Studio, the compiler may not yet generate instructions from all feature sets required by the extension level you specify. For example, /arch:armv8.1
allows the _Interlocked*
intrinsic functions to use the appropriate atomic instruction that was introduced with the ARMv8.1 extension, FEAT_LSE, but compiler support requires Visual Studio 2022 version 17.2 or later.
The _M_ARM64
macro is defined by default when compiling for an ARM64 target. For more information, see Predefined macros.
When you use /clr
to compile, /arch
has no effect on code generation for managed functions. /arch
only affects code generation for native functions.
-
Open the Property Pages dialog box for the project. For more information, see Set C++ compiler and build properties in Visual Studio.
-
Select the Configuration Properties > C/C++ > Command Line property page.
-
In the Additional options box, add
/arch:armv8.0
or higher. Choose OK to save your changes.
- See xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A.
/arch
(Minimum CPU architecture)
MSVC compiler options
MSVC compiler command-line syntax