Enables control flow protection mechanisms.
Linux: | None |
Windows: | /guard:keyword |
keyword |
Specifies the control flow protection mechanism. Possible values are:
|
OFF |
The control flow protection mechanisms are disabled. |
This option enables control flow protection mechanisms.
Options /guard:cf, /guard:cf,nochecks, and /guard:ehcont must be passed to both the compiler and linker.
Code compiled using /guard:cf can be linked to libraries and object files that are not compiled using the option.
This option has been added for Microsoft compatibility. Keywords cf and ehcont use the Microsoft implementation.
This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation.
Visual Studio: Code Generation > Control Flow Guard
Eclipse: None
None