Skip to content

Repo sync for protected branch #5044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions docs/build/reference/arch-arm64.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
---
description: "Learn more about: /arch (ARM64)"
title: "/arch (ARM64)"
ms.date: 08/30/2022
ms.date: 05/24/2024
---
# `/arch` (ARM64)

Specifies the architecture for code generation on ARM64. For more information on **`/arch`** for other target architectures, see [`/arch` (x86)](arch-x86.md), [`/arch` (x64)](arch-x64.md), and [`/arch` (ARM)](arch-arm.md).
Specifies the Arm A-Profile architecture extension for code generation on ARM64. For more information about **`/arch`** for other target architectures, see [`/arch` (x86)](arch-x86.md), [`/arch` (x64)](arch-x64.md), and [`/arch` (ARM)](arch-arm.md).

## Syntax

> **`/arch:`**\[**`armv8.0`**-**`armv8.8`**]
>**`/arch:<armv8.0|armv8.1|armv8.2|armv8.3|armv8.4|armv8.5|armv8.6|armv8.7|armv8.8|armv8.9>`**[[+feature]](feature-arm64.md)\
>**`/arch:<armv9.0|armv9.1|armv9.2|armv9.3|armv9.4>`**[[+feature]](feature-arm64.md)

## Arguments

**`/arch:armv8.0`** through **`/arch:armv8.8`**\
Optional. Specifies minimum CPU extension requirements for ARMv8.x-A. The default is **`/arch:armv8.0`**.
**`/arch:armv8.x`**\
Specifies the Armv8-A architecture, where **`x`** is a required extension value from **`0`** to **`9`**<sup>1</sup>. By default, the compiler uses the **`/arch:armv8.0`** behavior if no architecture is specified.

**`/arch:armv9.x`**<sup>2</sup>\
Specifies the Armv9-A architecture, where **`x`** is a required extension value from **`0`** to **`4`**. By default, the compiler uses the **`/arch:armv8.0`** behavior if no architecture is specified.

## 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.
You may specify an ARM64 extension from Armv8.0-A through Armv8.9-A, and Armv9.0-A through Armv9.4-A. Optionally, enable one or more architecture features by appending a feature argument to the option<sup>3</sup>. For example, to target Armv8.0-A and enable feature `FEAT_LSE`, append feature argument **`lse`** so that the option becomes **`/arch:armv8.0+lse`**. For more information about available features and their requirements, see [`/feature` (ARM64)](feature-arm64.md)<sup>3</sup>.

> [!NOTE]
> 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 introduced with the Armv8.1-A extension feature `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](../../preprocessor/predefined-macros.md).

When you use [`/clr`](clr-common-language-runtime-compilation.md) to compile, **`/arch`** has no effect on code generation for managed functions. **`/arch`** only affects code generation for native functions.
**`/arch`** only affects code generation for native functions. When you use [`/clr`](clr-common-language-runtime-compilation.md) to compile, **`/arch`** has no effect on code generation for managed functions.

### To set the `/arch` 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](../working-with-project-properties.md).

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

1. In the **Additional options** box, add *`/arch:armv8.0`* or higher. Choose **OK** to save your changes.
1. In the **Additional options** box, add *`/arch:armv8.0`* or replace `armv8.0` with a different ARM64 extension. Choose **OK** to save your changes.

### To set this compiler option programmatically

- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.

<sup>1</sup> Armv8-A architecture extension `armv8.9` is available starting in Visual Studio 2022 version 17.10.\
<sup>2</sup> Armv9-A architecture extensions are available starting in Visual Studio 2022 version 17.10.\
<sup>3</sup> Architecture feature enablement is available starting in Visual Studio 2022 version 17.10.

## See also

[`/arch` (Minimum CPU architecture)](arch-minimum-cpu-architecture.md)\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This table contains an alphabetical list of compiler options. For a list of comp
| [`/?`](help-compiler-command-line-help.md) | Lists the compiler options. |
| [`/AI<dir>`](ai-specify-metadata-directories.md) | Specifies a directory to search to resolve file references passed to the [`#using`](../../preprocessor/hash-using-directive-cpp.md) directive. |
| [`/analyze`](analyze-code-analysis.md) | Enables code analysis. |
| [`/arch:<IA32|SSE|SSE2|AVX|AVX2|AVX512>`](arch-x86.md) | Minimum CPU architecture requirements. IA32, SSE, and SSE2 are x86 only. |
| [`/arch`](arch-minimum-cpu-architecture.md) | Minimum CPU architecture requirements. |
| `/arm64EC` | Generate code compatible with the arm64EC ABI. |
| [`/await`](await-enable-coroutine-support.md) | Enable coroutines (resumable functions) extensions. |
| [`/await:strict`](await-enable-coroutine-support.md) | Enable standard C++20 coroutine support with earlier language versions. |
Expand Down Expand Up @@ -65,6 +65,7 @@ This table contains an alphabetical list of compiler options. For a list of comp
| [`/FC`](fc-full-path-of-source-code-file-in-diagnostics.md) | Displays the full path of source code files passed to *cl.exe* in diagnostic text. |
| [`/Fd`](fd-program-database-file-name.md) | Renames program database file. |
| [`/Fe`](fe-name-exe-file.md) | Renames the executable file. |
| [`/feature`](feature-arm64.md) | Enable architecture features.<sup>17.10</sup> |
| [`/FI<file>`](fi-name-forced-include-file.md) | Preprocesses the specified include file. |
| [`/Fi`](fi-preprocess-output-file-name.md) | Specifies the preprocessed output file name. |
| [`/Fm`](fm-name-mapfile.md) | Creates a mapfile. |
Expand Down Expand Up @@ -257,6 +258,8 @@ This table contains an alphabetical list of compiler options. For a list of comp
| [`/Zs`](zs-syntax-check-only.md) | Checks syntax only. |
| [`/ZW`](zw-windows-runtime-compilation.md) | Produces an output file to run on the Windows Runtime. |

<sup>17.10</sup> This option is available starting in Visual Studio 2022 version 17.10.

## See also

[MSVC compiler options](compiler-options.md)\
Expand Down
5 changes: 4 additions & 1 deletion docs/build/reference/compiler-options-listed-by-category.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This article contains a categorical list of compiler options. For an alphabetica

| Option | Purpose |
|--|--|
| [`/arch:<IA32|SSE|SSE2|AVX|AVX2|AVX512>`](arch-x86.md) | Minimum CPU architecture requirements. IA32, SSE, and SSE2 are x86 only. |
| [`/arch`](arch-minimum-cpu-architecture.md) | Minimum CPU architecture requirements. |
| [`/clr`](clr-common-language-runtime-compilation.md) | Produces an output file to run on the common language runtime. |
| [`/clr:implicitKeepAlive-`](clr-common-language-runtime-compilation.md) | Turn off implicit emission of `System::GC::KeepAlive(this)`. |
| [`/clr:initialAppDomain`](clr-common-language-runtime-compilation.md) | Enable initial AppDomain behavior of Visual C++ 2002. |
Expand All @@ -42,6 +42,7 @@ This article contains a categorical list of compiler options. For an alphabetica
| [`/EHc`](eh-exception-handling-model.md) | `extern "C"` defaults to `nothrow`. |
| [`/EHr`](eh-exception-handling-model.md) | Always generate `noexcept` runtime termination checks. |
| [`/EHs`](eh-exception-handling-model.md) | Enable C++ exception handling (no SEH exceptions). |
| [`/feature`](feature-arm64.md) | Enable architecture features.<sup>17.10</sup> |
| [`/fp:contract`](fp-specify-floating-point-behavior.md) | Consider floating-point contractions when generating code. |
| [`/fp:except[-]`](fp-specify-floating-point-behavior.md) | Consider floating-point exceptions when generating code. |
| [`/fp:fast`](fp-specify-floating-point-behavior.md) | "fast" floating-point model; results are less predictable. |
Expand Down Expand Up @@ -325,6 +326,8 @@ Experimental options may only be supported by certain versions of the compiler.
| [`/Ze`](za-ze-disable-language-extensions.md) | Deprecated. Enables language extensions. |
| [`/Zg`](zg-generate-function-prototypes.md) | Removed in Visual Studio 2015. Generates function prototypes. |

<sup>17.10</sup> This option is available starting in Visual Studio 2022 version 17.10.

## See also

[C/C++ building reference](c-cpp-building-reference.md)\
Expand Down
46 changes: 46 additions & 0 deletions docs/build/reference/feature-arm64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
description: "Learn more about: /feature (ARM64)"
title: "/feature (ARM64)"
ms.date: 05/28/2024
---
# `/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)](arch-arm64.md).

## 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](../working-with-project-properties.md).

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

1. 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 <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A>.

## See also

[`/arch` (Minimum CPU architecture)](arch-minimum-cpu-architecture.md)\
[MSVC compiler options](compiler-options.md)\
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)
8 changes: 4 additions & 4 deletions docs/build/reference/headerunit.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "/headerUnit (Use header unit IFC)"
description: "Use the /headerUnit compiler option to associate a header file with the header unit to import in its place."
ms.date: 02/01/2022
ms.date: 5/28/2024
f1_keywords: ["/headerUnit"]
helpviewer_keywords: ["/headerUnit", "Use header unit IFC"]
author: "tylermsft"
Expand All @@ -14,8 +14,8 @@ Imports a header unit. Tells the compiler where to find the *`.ifc`* file (the b
## Syntax

> **`/headerUnit`** *`header-filename`*=*`ifc-filename`*\
> **`/headerUnit:quote`** \[*`header-filename`*=*`ifc-filename`*\]\
> **`/headerUnit:angle`** \[*`header-filename`*=*`ifc-filename`*\]
> **`/headerUnit:quote`** *`header-filename`*=*`ifc-filename`*\
> **`/headerUnit:angle`** *`header-filename`*=*`ifc-filename`*

### Arguments

Expand All @@ -39,7 +39,7 @@ When the compiler comes across `import "file";` or `import <file>;` this compile

- **`/headerUnit:angle`** looks up the compiled header unit file using the same rules as `#include <file>`.

The compiler can't map a single *`header-name`* to multiple *`.ifc`* files. Mapping multiple *`header-name`* arguments to a single *`.ifc`* is possible, but it isn't recommended. The contents of the *`.ifc`* are imported as if it was only the header specified by *`header-name`*.
The compiler can't map a single *`header-name`* to multiple *`.ifc`* files. You can map multiple *`header-name`* arguments to a single *`.ifc`*. The contents of the *`.ifc`* are imported as if it was only the header specified by *`header-name`*.

The compiler implicitly enables the new preprocessor when this option is used. If any form of `/headerUnit` is specified on the command line, then [`/Zc:preprocessor`](zc-preprocessor.md) is added to the command line by the compiler. To opt out of the implicit `/Zc:preprocessor`, specify: `/Zc:preprocessor-`

Expand Down
2 changes: 2 additions & 0 deletions docs/build/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ items:
href: ../build/reference/favor-optimize-for-architecture-specifics.md
- name: /FC (Full path of source code file in diagnostics)
href: ../build/reference/fc-full-path-of-source-code-file-in-diagnostics.md
- name: /feature (Enable architecture features)
href: ../build/reference/feature-arm64.md
- name: /fp (Specify floating-point behavior)
href: ../build/reference/fp-specify-floating-point-behavior.md
- name: /fpcvt (Floating-point to unsigned integer conversion behavior)
Expand Down
11 changes: 6 additions & 5 deletions docs/windows/latest-supported-vc-redist.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Latest supported Visual C++ Redistributable downloads"
description: "This article lists the download links for the latest versions of Visual C++ Redistributable packages."
ms.date: 02/26/2024
ms.date: 5/28/2024
helpviewer_keywords:
[
"redist",
Expand All @@ -28,7 +28,8 @@ This table lists the latest supported English (en-US) Microsoft Visual C++ Redis
Unlike older versions of Visual Studio, which have infrequent redist updates, the version number isn't listed in the following table for Visual Studio 2015-2022 because the redist is updated frequently. To find the version number of the latest redist, download the redist you're interested in using one of the following links. Then, look at its properties using Windows File Explorer. In the **Details** pane, the **File version** contains the version of the redist.

## Latest Microsoft Visual C++ Redistributable Version
The latest version is `14.38.33135.0`

The latest version is `14.40.33810.0`

Use the following links to download this version for each supported architecture:

Expand All @@ -44,17 +45,17 @@ Download other versions, including long term servicing release channel (LTSC) ve

- The Visual C++ Redistributable for Visual Studio 2015-2022 doesn't have separate packages for different languages. It contains EULAs for all supported languages.

- Some of the downloads that are mentioned in this article are currently available on [my.visualstudio.com](https://my.visualstudio.com/). Log in using a Visual Studio Subscription account so that you can access the download links. If you're asked for credentials, use your existing Visual Studio subscription account. Or, create a free account by choosing the **No account? Create one!** link.
- Some of the downloads that are mentioned in this article are currently available on [my.visualstudio.com](https://my.visualstudio.com/). Log in using a Visual Studio Subscription account so that you can access the download links. If you're asked for credentials, use your existing Visual Studio subscription account. Or, create a free account by choosing the **No account? Create one!** link.

- Visual Studio versions since Visual Studio 2015 share the same Redistributable files. For example, any apps built by the Visual Studio 2015, 2017, 2019, or 2022 toolsets can use the latest Microsoft Visual C++ Redistributable. However, the version of the Microsoft Visual C++ Redistributable installed on the machine must be the same or higher than the version of the Visual C++ toolset used to create your application. For more information about which version of the Redistributable to install, see [Determining which DLLs to redistribute](determining-which-dlls-to-redistribute.md). For more information about binary compatibility, see [C++ binary compatibility between Visual Studio versions](../porting/binary-compat-2015-2017.md).

- **Windows XP Support**: Microsoft ended support for Windows XP on April 8, 2014. Current versions of the Visual C++ Redistributable for Visual Studio 2015-2022 only support Windows 7, 8.1, 10, and 11. The last version of the Visual C++ Redistributable that works on Windows XP shipped in Visual Studio 2019 version 16.7 (file versions starting with **14.27**). The Redistributable is available in the [my.visualstudio.com Downloads](https://my.visualstudio.com/Downloads/) section as **Visual C++ Redistributable for Visual Studio 2019 (version 16.7)**. Use the Search box to find this version. To download the files, select the platform and language you need, and then choose the **Download** button.

- The Visual C++ Redistributable supports several command-line options. For more information, see [Command-line options for the Redistributable packages](./redistributing-visual-cpp-files.md#command-line-options-for-the-redistributable-packages).

## Visual Studio 2013 (VC++ 12.0)
## Visual Studio 2013 (VC++ 12.0) (no longer supported)

These links download the latest supported en-US Microsoft Visual C++ Redistributable packages for Visual Studio 2013.
These links download the latest available en-US Microsoft Visual C++ Redistributable packages for Visual Studio 2013.
You can download other versions and languages from [Update for Visual C++ 2013 Redistributable Package](https://support.microsoft.com/topic/update-for-visual-c-2013-redistributable-package-d8ccd6a5-4e26-c290-517b-8da6cfdf4f10) or from [my.visualstudio.com](https://my.visualstudio.com/).

| Architecture | Version | Link |
Expand Down