Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 2.14 KB

File metadata and controls

45 lines (29 loc) · 2.14 KB
description Learn more about the /INFERASANLIBS (Use inferred sanitizer libs) linker option
title /INFERASANLIBS (Use inferred sanitizer libs)
ms.date 03/01/2021
f1_keywords
/INFERASANLIBS
/INFERASANLIBS:NO
helpviewer_keywords
/INFERASANLIBS [C++]
address sanitizer [C++] linker option

/INFERASANLIBS (Use inferred sanitizer libs)

Use the /INFERASANLIBS linker option to enable or disable linking to the default AddressSanitizer libraries. As of Visual Studio 2019 16.9, the only supported sanitizer is AddressSanitizer.

Syntax

/INFERASANLIBS[:NO]

Remarks

The /INFERASANLIBS linker option enables the default AddressSanitizer libraries. This option is enabled by default.

The /INFERASANLIBS and /INFERASANLIBS:NO linker options offer support for advanced users. For more information, see AddressSanitizer build and language reference.

The /INFERASANLIBS option is available beginning in Visual Studio 2019 version 16.9.

To set the /INFERASANLIBS linker option in the Visual Studio development environment

  1. Open your project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > Linker > Command Line property page.

  3. Modify the Additional Options property. To enable default libraries, enter /INFERASANLIBS in the edit box. To disable default libraries, enter /INFERASANLIBS:NO instead.

  4. Choose OK or Apply to save your changes.

To set this linker option programmatically

  • See xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.AdditionalOptions%2A.

See also

MSVC linker reference
MSVC linker options
/fsanitize (Enable sanitizers)
AddressSanitizer overview
AddressSanitizer known issues
AddressSanitizer build and language reference