You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/reference/qspectre.md
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -52,21 +52,23 @@ The effect of **`/Qspectre`** on performance appeared to be negligible in severa
52
52
53
53
### Required libraries
54
54
55
-
The **`/Qspectre`**compiler option generates code that implicitly links versions of the runtime libraries built to provide Spectre mitigations. These libraries are optional components that must be installed by using the Visual Studio Installer:
55
+
When you enable the **Configuration Properties**> **C/C++** > **Code Generation** > **Spectre Mitigation** option in the Visual Studio IDE project properties, the following occur:
56
56
57
-
- MSVC version *version_numbers* Libs for Spectre \[(x86 and x64) | (ARM) | (ARM64)]
58
-
- Visual C++ ATL for \[(x86/x64) | ARM | ARM64] with Spectre Mitigations
59
-
- Visual C++ MFC for \[x86/x64 | ARM | ARM64] with Spectre Mitigations
57
+
1.**`/Qspectre`** is thrown to the compiler, ensuring that code compiled in your project has mitigations.
58
+
2. The linker [`/LIBPATH`](./libpath-additional-libpath.md) options are changed to the Spectre-mitigation enabled libraries. These libraries are optional components that must be installed by using the Visual Studio Installer:
59
+
- MSVC version *version_numbers* Libs for Spectre \[(x86 and x64) | (ARM) | (ARM64)]
60
+
- Visual C++ ATL for \[(x86/x64) | ARM | ARM64] with Spectre Mitigations
61
+
- Visual C++ MFC for \[x86/x64 | ARM | ARM64] with Spectre Mitigations
60
62
61
63
::: moniker range=">=msvc-160"
62
64
63
-
If you build your code by using **`/Qspectre`** and these libraries aren't installed, the build system reports warning [MSB8040](/visualstudio/msbuild/errors/msb8040). If your MFC or ATL code fails to build, and the linker reports an error such as "fatal error LNK1104: cannot open file 'oldnames.lib'", these missing libraries may be the cause.
65
+
If Spectre mitigations are enabled and these libraries aren't installed, the build system reports warning [MSB8040](/visualstudio/msbuild/errors/msb8040). If your MFC or ATL code fails to build, and the linker reports an error such as "fatal error LNK1104: cannot open file 'oldnames.lib'", these missing libraries may be the cause.
64
66
65
67
::: moniker-end
66
68
67
69
::: moniker range="<=msvc-150"
68
70
69
-
If you build your code by using **`/Qspectre`** and these libraries aren't installed, the build system reports warning MSB8038: "Spectre mitigation is enabled but Spectre mitigated libraries are not found". If your MFC or ATL code fails to build, and the linker reports an error such as "fatal error LNK1104: cannot open file 'oldnames.lib'", these missing libraries may be the cause.
71
+
If Spectre mitigations are enabled and these libraries aren't installed, the build system reports warning MSB8038: "Spectre mitigation is enabled but Spectre mitigated libraries are not found". If your MFC or ATL code fails to build, and the linker reports an error such as "fatal error LNK1104: cannot open file 'oldnames.lib'", these missing libraries may be the cause.
0 commit comments