Skip to content

Commit a93e9ea

Browse files
Merge pull request #6064 from davidmrdavid/dev/dajusto/clarify-hotpatch-docs
Clarify that `/hotpatch` is only available in x86 targets
2 parents ef421fd + 273d6ad commit a93e9ea

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed
Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
---
2-
description: "Learn more about: /hotpatch (Create Hotpatchable Image)"
3-
title: "/hotpatch (Create Hotpatchable Image)"
4-
ms.date: "12/7/2021"
2+
description: "Learn more about: /hotpatch (Create hotpatchable image)"
3+
title: "/hotpatch (Create hotpatchable image)"
4+
ms.date: "9/4/2025"
55
f1_keywords: ["/hotpatch", "VC.Project.VCCLCompilerTool.CreateHotpatchableImage"]
6-
helpviewer_keywords: ["hot patching", "-hotpatch compiler option [C++]", "/hotpatch compiler option [C++]", "hotpatching"]
7-
ms.assetid: aad539b6-c053-4c78-8682-853d98327798
6+
helpviewer_keywords: ["hot patching", "hotpatching", "-hotpatch compiler option [C++]", "/hotpatch compiler option [C++]"]
87
---
9-
# /hotpatch (Create Hotpatchable Image)
8+
# /hotpatch (Create hotpatchable image)
109

11-
Prepares an image for hot patching.
10+
Prepares an image for hotpatching.
1211

1312
## Syntax
1413

1514
```
1615
/hotpatch
1716
```
1817

18+
> [!NOTE]
19+
> This option is only available for x86
20+
1921
## Remarks
2022

21-
When **/hotpatch** is used in a compilation, the compiler ensures that the first instruction of each function is at least two bytes, and no jump within the function goes to the first instruction. These conditions are required for hot patching.
23+
When `/hotpatch` is used during compilation, the compiler ensures that the first instruction of each function is at least 2 bytes long and that no jump within the function goes to the first instruction. These conditions are required for hotpatching.
2224

23-
To complete the preparation for making an image hotpatchable, after you use **/hotpatch** to compile, you must use [/FUNCTIONPADMIN (Create Hotpatchable Image)](functionpadmin-create-hotpatchable-image.md) to link. When you compile and link an image by using one invocation of cl.exe, **/hotpatch** implies **/functionpadmin**.
25+
To complete the preparation for making an image hotpatchable, after you compile with `/hotpatch`, use [`/functionpadmin`](functionpadmin-create-hotpatchable-image.md) to link. When you compile and link an image using one invocation of `cl.exe`, `/hotpatch` implies `/functionpadmin`.
2426

25-
Because instructions are always two bytes or larger on the ARM architecture, and because x64 compilation is always treated as if **/hotpatch** has been specified, you don't have to specify **/hotpatch** when you compile for these targets; however, you must still link by using **/functionpadmin** to create hotpatchable images for them. The **/hotpatch** compiler option only affects x86 compilation.
27+
> [!TIP]
28+
> Arm64 and x64 architectures are always treated as hotpatchable. But you must still link by using `/functionpadmin` to create hotpatchable images for them.
2629
2730
### To set this compiler option in the Visual Studio development environment
2831

2932
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).
30-
3133
1. Select the **Configuration Properties** > **C/C++** > **Command Line** property page.
32-
3334
1. Add the compiler option to the **Additional Options** box.
3435

3536
### To set this compiler option programmatically
@@ -38,5 +39,5 @@ Because instructions are always two bytes or larger on the ARM architecture, and
3839

3940
## See also
4041

41-
[MSVC Compiler Options](compiler-options.md)<br/>
42+
[MSVC Compiler Options](compiler-options.md)\
4243
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)

0 commit comments

Comments
 (0)