/arch
(ARM64)
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).
Syntax
/arch:
[armv8.0
-armv8.8
]
Arguments
/arch:armv8.0
through /arch:armv8.8
Optional. Specifies minimum CPU extension requirements for ARMv8.x-A. The default is /arch:armv8.0
.
Remarks
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.
To set the /arch
compiler option in Visual Studio
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.
To set this compiler option programmatically
- See AdditionalOptions.
See also
/arch
(Minimum CPU architecture)
MSVC compiler options
MSVC compiler command-line syntax
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for