Skip to content
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
15 changes: 7 additions & 8 deletions docs/build/clang-support-cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,18 @@ You can use Visual Studio with Clang to edit and debug C++ CMake projects that t

For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose the **C++ Clang-cl for v142 build tools** or **C++ Clang-cl for v143 build tools** component.

![Screenshot of the Visual Studio Installer Individual Components page that shows Clang components available for installation.](media/clang-install-vs2019.png)
:::image type="content" source="media/clang-install-vs2019.png" alt-text="Screenshot of the Visual Studio Installer Individual Components page. C++ Clang Compiler For Windows and C++ Clang-cl for v142 build tools are selected.":::

::: moniker-end
::: moniker range="msvc-170"

For the best IDE support in Visual Studio, we recommend using the latest Clang compiler tools for Windows. If you don't already have those, you can install them by opening the Visual Studio Installer and choosing **C++ Clang compiler for Windows** under **Desktop development with C++** optional components. You may prefer to use an existing Clang installation on your machine; if so, choose the **MSBuild support for LLVM (clang-cl) toolset** component.

![Screenshot of the Visual Studio Installer Individual Components page that shows Clang components available for installation.](media/clang-install-vs2022.png)
:::image type="content" source="media/clang-install-vs2022.png" alt-text="Screenshot of the Visual Studio Installer Individual Components page. C++ Clang Compiler For Windows and MSBuild support for LLVM are selected.":::

::: moniker-end
::: moniker range=">=msvc-160"


## Create a new configuration

To add a new Clang configuration to a CMake project:
Expand All @@ -47,11 +46,11 @@ To add a new Clang configuration to a CMake project:

1. Under **Configurations**, press the **Add Configuration** button:

![Screenshot of the controls at the top of the C Make Settings dialog, with the Add Configuration control highlighted.](media/cmake-add-config-icon.png)
:::image type="content" source="media/cmake-add-config-icon.png" alt-text="Screenshot of the controls at the top of the C Make Settings dialog. The Add Configuration button is highlighted.":::

1. Choose the desired Clang configuration (note that separate Clang configurations are provided for Windows and Linux), then press **Select**:

![Screenshot of the Add Configuration to C Make Settings dialog for Clang configuration.](media/cmake-clang-configuration.png)
:::image type="content" source="media/cmake-clang-configuration.png" alt-text="Screenshot of the Add Configuration to C Make Settings dialog for Clang configuration. Contains entries such as Mingw64-Release, x86-Debug, x64-Debug, x86-Clang Debug, and so on.":::

1. To make modifications to this configuration, use the **CMake Settings Editor**. For more information, see [Customize CMake build settings in Visual Studio](customize-cmake-settings.md).

Expand All @@ -63,7 +62,7 @@ To modify an existing configuration to use Clang, follow these steps:

1. Under **General** select the **Toolset** dropdown and choose the desired Clang toolset:

![Screenshot of the General dialog box showing that the Toolset is selected and clang cl x 86 is highlighted.](media/cmake-clang-toolset.png)
![Screenshot of the General dialog box showing the Toolset drop-down and clang cl x 86 is highlighted.](media/cmake-clang-toolset.png)

## Custom Clang locations

Expand All @@ -74,7 +73,7 @@ By default, Visual Studio looks for Clang in two places:

You can specify another location by setting the **CMAKE_C_COMPILER** and **CMAKE_CXX_COMPILER** CMake variables in **CMake Settings**:

![Screenshot of the C Make Settings dialog box with the C Make C X X Compiler highlighted.](media/clang-location-cmake.png)
:::image type="content" source="media/clang-location-cmake.png" alt-text="Screenshot of the C Make Settings dialog box with the C Make C X X Compiler highlighted. C Make configurations are listed such as x64-Clang-Debug, Linux-Clang-Release, and so on." Lightbox="media/clang-location-cmake.png":::

## Clang compatibility modes

Expand All @@ -88,6 +87,6 @@ After you have set up a Clang configuration, you can build and debug the project

When debugging, you can use breakpoints, memory and data visualization, and most other debugging features. Some compiler-dependent features such as Edit and Continue aren't available for Clang configurations.

![Screenshot of the Visual Studio debugger debugging a CMake Clang project.](media/clang-debug-visualize.png)
:::image type="content" source="media/clang-debug-visualize.png" alt-text="Screenshot of the Visual Studio debugger debugging a CMake Clang project.":::

::: moniker-end
14 changes: 8 additions & 6 deletions docs/build/overview-of-arm-abi-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
description: "Learn more about: Overview of ARM32 ABI Conventions"
title: "Overview of ARM ABI Conventions"
ms.date: "07/11/2018"
ms.assetid: 23f4ae8c-3148-4657-8c47-e933a9f387de
---
# Overview of ARM32 ABI Conventions

The application binary interface (ABI) for code compiled for Windows on ARM processors is based on the standard ARM EABI. This article highlights key differences between Windows on ARM and the standard. This document covers the ARM32 ABI. For information about the ARM64 ABI, see [Overview of ARM64 ABI conventions](arm64-windows-abi-conventions.md). For more information about the standard ARM EABI, see [Application Binary Interface (ABI) for the ARM Architecture](https://github.com/ARM-software/abi-aa) (external link).

> [!NOTE]
> Using the Microsoft Visual C++ (MSVC) build tools to target ARM32 is deprecated starting with Visual Studio 2026. If you need to target ARM32, use the Visual Studio 2022 v143 build tools.

## Base Requirements

Windows on ARM always presumes that it's running on an ARMv7 architecture. Floating-point support in the form of VFPv3-D32 or later must be present in hardware. The VFP must support both single-precision and double-precision floating-point in hardware. The Windows runtime doesn't support emulation of floating-point to enable running on non-VFP hardware.
Expand Down Expand Up @@ -124,7 +126,7 @@ Initialization is performed exactly once, before argument processing begins:

For each argument in the list, the first matching rule from the following list is applied:

1. If the argument is a composite type whose size cannot be statically determined by both the caller and the callee, the argument is copied to memory and replaced by a pointer to the copy.
1. If the argument is a composite type whose size can't be statically determined by both the caller and the callee, the argument is copied to memory and replaced by a pointer to the copy.

1. If the argument is a byte or 16-bit half-word, then it is zero-extended or sign-extended to a 32-bit full word and treated as a 4-byte argument.

Expand All @@ -136,19 +138,19 @@ For each argument in the list, the following rules are applied in turn until the

1. If the argument is a VFP type and there are enough consecutive unallocated VFP registers of the appropriate type, then the argument is allocated to the lowest-numbered sequence of such registers.

1. If the argument is a VFP type, all remaining unallocated registers are marked as unavailable. The NSAA is adjusted upwards until it is correctly aligned for the argument type and the argument is copied to the stack at the adjusted NSAA. The NSAA is then incremented by the size of the argument.
1. If the argument is a VFP type, all remaining unallocated registers are marked as unavailable. The NSAA is adjusted upwards until it's correctly aligned for the argument type and the argument is copied to the stack at the adjusted NSAA. The NSAA is then incremented by the size of the argument.

1. If the argument requires 8-byte alignment, the NCRN is rounded up to the next even register number.

1. If the size of the argument in 32-bit words is not more than r4 minus NCRN, the argument is copied into core registers, starting at the NCRN, with the least significant bits occupying the lower-numbered registers. The NCRN is incremented by the number of registers used.
1. If the size of the argument in 32-bit words isn't more than r4 minus NCRN, the argument is copied into core registers, starting at the NCRN, with the least significant bits occupying the lower-numbered registers. The NCRN is incremented by the number of registers used.

1. If the NCRN is less than r4 and the NSAA is equal to the SP, the argument is split between core registers and the stack. The first part of the argument is copied into the core registers, starting at the NCRN, up to and including r3. The rest of the argument is copied onto the stack, starting at the NSAA. The NCRN is set to r4 and the NSAA is incremented by the size of the argument minus the amount passed in registers.

1. If the argument requires 8-byte alignment, the NSAA is rounded up to the next 8-byte aligned address.

1. The argument is copied into memory at the NSAA. The NSAA is incremented by the size of the argument.

The VFP registers aren't used for variadic functions, and Stage C rules 1 and 2 are ignored. It means that a variadic function can begin with an optional push {r0-r3} to prepend the register arguments to any additional arguments passed by the caller, and then access the entire argument list directly from the stack.
The VFP registers aren't used for variadic functions, and Stage C rules 1 and 2 are ignored. It means that a variadic function can begin with an optional push {r0-r3} to prepend the register arguments to any other arguments passed by the caller, and then access the entire argument list directly from the stack.

Integer type values are returned in r0, optionally extended to r1 for 64-bit return values. VFP/NEON floating-point or SIMD type values are returned in s0, d0, or q0, as appropriate.

Expand All @@ -158,7 +160,7 @@ The stack must always remain 4-byte aligned, and must be 8-byte aligned at any f

Functions that have to use a frame pointer—for example, functions that call `alloca` or that change the stack pointer dynamically—must set up the frame pointer in r11 in the function prologue and leave it unchanged until the epilogue. Functions that don't require a frame pointer must perform all stack updates in the prologue and leave the stack pointer unchanged until the epilogue.

Functions that allocate 4 KB or more on the stack must ensure that each page prior to the final page is touched in order. This order ensures that no code can "leap over" the guard pages that Windows uses to expand the stack. Typically, the expansion is done by the `__chkstk` helper, which is passed the total stack allocation in bytes divided by 4 in r4, and which returns the final stack allocation amount in bytes back in r4.
Functions that allocate 4 KB or more on the stack must ensure that each page before the final page is touched in order. This order ensures that no code can "leap over" the guard pages that Windows uses to expand the stack. Typically, the expansion is done by the `__chkstk` helper, which is passed the total stack allocation in bytes divided by 4 in r4, and which returns the final stack allocation amount in bytes back in r4.

### Red zone

Expand Down
10 changes: 6 additions & 4 deletions docs/build/reference/await-enable-coroutine-support.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
---
description: "Learn more about: /await (Enable coroutine support)"
title: "/await (Enable coroutine support)"
ms.date: "08/15/2017"
ms.date: 09/08/2025
f1_keywords: ["/await", "-await"]
helpviewer_keywords: ["/await enable coroutine support [C++]", "-await enable coroutine support [C++]", "await enable coroutine support [C++]"]
ms.assetid: 302c8e69-09b6-4c58-bcdd-0a6a8713a8df
---
# `/await` (Enable coroutine support)
# `/await` (Enable coroutine support) Deprecated.

Use the **`/await`** compiler option to enable compiler support for coroutines.

> [!NOTE]
> The **`/await`** option is deprecated starting with Visual Studio 2026 and will be removed in a future release. Standard C++ coroutines are available by default in C++20 or later. Or use **`/await:strict`** option when using earlier versions of the C++ language.

## Syntax

> **`/await`**\
Expand All @@ -19,7 +21,7 @@ Use the **`/await`** compiler option to enable compiler support for coroutines.

The **`/await`** compiler option enables compiler support for C++ coroutines and the keywords **`co_await`**, **`co_yield`**, and **`co_return`**. This option is off by default. For information about support for coroutines in Visual Studio, see the [Visual Studio Team Blog](https://devblogs.microsoft.com/cppblog/category/coroutine/). For more information about the coroutines standard proposal, see [N4628 Working Draft, Technical Specification for C++ Extensions for Coroutines](https://wg21.link/n4628).

The **`/await`** option is available beginning in Visual Studio 2015.
The **`/await`** option is available beginning in Visual Studio 2015 and is deprecated starting with Visual Studio 2026.

Starting in Visual Studio 2019 version 16.10, the **`/await:strict`** option can be used in place of **`/await`**. The option provides C++20-compatible coroutine support in projects that build in C++14 or C++17 mode. In **`/await:strict`** mode, library support is provided in \<coroutine> and in the `std` namespace.

Expand Down
10 changes: 5 additions & 5 deletions docs/build/reference/debug-generate-debug-info.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: "Learn more about: /DEBUG (Generate debug info)"
title: "/DEBUG (Generate Debug Info)"
ms.date: 10/26/2023
ms.date: 09/08/2025
f1_keywords: ["VC.Project.VCLinkerTool.GenerateDebugInformation", "/debug"]
helpviewer_keywords: ["DEBUG linker option", "/DEBUG linker option", "-DEBUG linker option", "PDB files", "debugging [C++], debug information files", "generate debug info linker option", "pdb files, generating debug info", ".pdb files, generating debug info", "debugging [C++], linker option", "program databases [C++]"]
ms.assetid: 1af389ae-3f8b-4d76-a087-1cdf861e9103
Expand All @@ -20,7 +20,10 @@ The **`/DEBUG`** option puts the debugging information from linked object and li

An executable (an EXE or DLL file) created for debugging contains the name and path of the corresponding PDB. The debugger reads the embedded name and uses the PDB when you debug the program. The linker uses the base name of the program and the extension *`.pdb`* to name the program database, and embeds the path where it was created. To override this default, set the [`/PDB`](pdb-use-program-database.md) option and specify a different file name.

The **`/DEBUG:FASTLINK`** option is available in Visual Studio 2017 and later. This option generates a limited PDB that indexes into the debug information in the object files and libraries used to build the executable instead of making a full copy. You can only use this limited PDB to debug from the computer where the binary and its libraries were built. If you deploy the binary elsewhere, you may debug it remotely from the build computer, but not directly on the test computer. Since Visual Studio 2019, **`/DEBUG:FULL`** linking times have improved significantly, and **`/DEBUG:FASTLINK`** isn't always faster than **`/DEBUG:FULL`**. Since **`/DEBUG:FASTLINK`** no longer provides large build time improvements and results in a slower debugging experience versus **`/DEBUG:FULL`**, this option is no longer recommended.
> [!Note]
> The **`/DEBUG:FASTLINK`** option is **deprecated and removed** starting in Visual Studio 2026. It was available in Visual Studio 2017 through Visual Studio 2022.

**`/DEBUG:FASTLINK`** generated a limited PDB that indexes into the debug information in the object files and libraries used to build the executable instead of making a full copy. You can only use this limited PDB to debug from the computer where the binary and its libraries were built. If you deploy the binary elsewhere, you may debug it remotely from the build computer, but not directly on the test computer. Since Visual Studio 2019, **`/DEBUG:FULL`** linking times have improved significantly, and **`/DEBUG:FASTLINK`** isn't always faster than **`/DEBUG:FULL`**. Since **`/DEBUG:FASTLINK`** no longer provides large build time improvements and results in a slower debugging experience versus **`/DEBUG:FULL`**, this option is no longer recommended, and is removed in Visual Studio 2026. Prefer using **`/DEBUG:FULL`**.

A **`/DEBUG:FASTLINK`** PDB can be converted to a full PDB that you can deploy to a test machine for local debugging. In Visual Studio, use the **Property Pages** dialog as described below to create a full PDB for the project or solution. In a developer command prompt, you can use the `mspdbcmf.exe` tool to create a full PDB.

Expand All @@ -41,11 +44,8 @@ It isn't possible to create an EXE or DLL that contains debug information. Debug
### To set this linker option in the Visual Studio development environment

1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).

1. Select the **Linker** > **Debugging** property page.

1. Modify the **Generate Debug Info** property to enable or disable PDB generation. This property enables **`/DEBUG:FASTLINK`** by default in Visual Studio 2017 and later.

1. Modify the **Generate Full Program Database File** property to enable **`/DEBUG:FULL`** for full PDB generation for every incremental build.

### To set this linker option programmatically
Expand Down
4 changes: 3 additions & 1 deletion docs/build/reference/midl-property-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ description: "Learn more about: MIDL Property Pages"
title: "MIDL Compiler Property Pages"
ms.date: "07/24/2019"
ms.topic: "article"
ms.assetid: 57498a01-fccc-4a0e-a036-6ff702f83126
f1_keywords:
- VC.Project.VCMidlTool.PreprocessorDefinitions
- VC.Project.VCMidlTool.AdditionalIncludeDirectories
Expand Down Expand Up @@ -112,6 +111,9 @@ Specifies the default character type of the C compiler that will be used to comp

Specifies which environment to target ([/env](/windows/win32/midl/-env) arm32|win32|ia64|x64).

> [!NOTE]
> Starting with Visual Studio 2026, the **`/env:arm32`** option is deprecated and removed. If you need to target ARM32, use the Visual Studio 2022 v143 build tools.

**Choices**

- **Not Set** - Win32
Expand Down
3 changes: 1 addition & 2 deletions docs/cpp/cpp-type-system-modern-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ description: "Learn more about: C++ type system"
title: "C++ type system"
ms.date: 11/04/2022
ms.topic: "concept-article"
ms.assetid: 553c0ed6-77c4-43e9-87b1-c903eec53e80
---
# C++ type system

Expand Down Expand Up @@ -56,7 +55,7 @@ The compiler recognizes these built-in types, and it has built-in rules that gov

The following illustration shows the relative sizes of the built-in types in the Microsoft C++ implementation:

![Diagram of the relative size in bytes of several built in types.](../cpp/media/built-intypesizes.png)
:::image type="content" source="../cpp/media/built-intypesizes.png" alt-text="Diagram showing the relative sizes in bytes of C++ built-in types: bool and char (1 byte), short (2 bytes), int, long, and float (4 bytes), double and long long (8 bytes)":::

The following table lists the most frequently used fundamental types, and their sizes in the Microsoft C++ implementation:

Expand Down
Loading